Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Problem while adding description of an object using a varibale
#2
Not Solved
It will not work bro.....
Because the way u have initialized the variable, it means u have created a single string with two properties....

So as its a single string and dat separator comma (,) is also is a part of dat string, so QTP is not separating those two properties....its taking the full string as a single property irrespective of whether it contains comma or inverted, though its look like two different properties in run time....But for QTP its a single string property which contains those inverted commas and a comma....dats d reason y u getting object identification error....

In this case, remove the extra inverted commas dat u have added, Split dat string on basis of comma, then use dat array by position....

Like following....


Code:
StrVar="name:=USER_NAME"+","+"visible:=True"
StrVar = Split(StrVar,",")

now use----

Code:
Browser("B1").Page("P1").WebEdit(StrVar(0),StrVar(1)).Set("Mercury")


It will surely work......



Hope i am Clear to u......If not thn ping me in messanger....

-------------
Thanx.
Reply


Messages In This Thread
RE: Problem while adding description of an object using a varibale - by souvikghosh_diatm - 08-25-2011, 10:22 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
Question adding two conditions into a while statement lotos 4 5,092 11-10-2017, 04:49 AM
Last Post: lotos
  Uft: Adding a property to all ojects into Repository ProTester 0 1,361 06-09-2017, 12:48 AM
Last Post: ProTester
  How to find out the object property in the Description language . njnirmal 9 6,677 05-19-2015, 12:30 AM
Last Post: qtptester66523
  HAVING PROBLEM IN CREATING OBJECT OF TEST BATCH RUNNER mayankchauhan 0 3,438 04-04-2014, 05:29 PM
Last Post: mayankchauhan
  adding an object to OR seven 1 2,659 02-17-2014, 02:23 PM
Last Post: basanth27

Forum Jump:


Users browsing this thread: 1 Guest(s)