Thanks Bhavin, the whole hierarchy is dynamic its not always Browser > Page > object if it make sense. Its silverlight Application...
Ayaz On Tuesday, September 16, 2014 7:18:47 AM UTC-4, bhavin v patel wrote: > > what you are trying to do is going to return string all the time. For > example, if you store 1 in datasheet and want to return that from sheet, > you will get "1". In your case you need to convert string into String > Object. I am not sure that sting builder will work in vbscript? > > > http://stackoverflow.com/questions/10582696/is-it-possible-to-get-a-net-string-object-instance-in-vbscript > > > workarround: > if your property is changing, you can pass it from excel, instead of > passing entire object .. ? > bhavin > > > > On Monday, September 15, 2014 10:35:10 AM UTC-4, Ayaz Ahmed wrote: >> >> Hi Guyz, >> >> set myp=Browser("title:=.*").window("text:=Search Last Name >> for.*","index:=0").page("title:=.*") <---- this works fine >> >> *consider this :* >> Browser("title:=.*").window("text:=Search Last Name >> for.*","index:=0").page("title:=.*") >> is stored in excel file column and i read the value using >> >> var=datatable.value("cloumn","sheet") >> and then try to create an object using that stored value >> >> set myobj=var >> i get error >> >> *Note: the browser information is dynamic so every time it will have >> a different hierarchy. that's why i want to place that into my excel sheet >> and pass it with every step.* >> when i read the value of variable var it displays like this >> "Browser(""title:=.*"").window(""text:=Search Last Name >> for.*"","index:=0"").page(""title:=.*"") " >> >> since it is a string so it display double quote in the start and at the >> end. >> notice that double quotes before and title is replace automatically with >> 2x double quotes. >> >> and i get error that object required. >> >> thanks >> >> -- -- You received this message because you are subscribed to the Google "QTP - HP Quick Test Professional - Automated Software Testing" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/MercuryQTP?hl=en --- You received this message because you are subscribed to the Google Groups "QTP - HP Quick Test Professional - Automated Software Testing" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
