08-25-2011, 10:22 AM
(This post was last modified: 08-25-2011, 10:26 AM by souvikghosh_diatm.)
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....
now use----
It will surely work......
Hope i am Clear to u......If not thn ping me in messanger....
-------------
Thanx.
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.