[b]Question asked by visitor[/b]
If there are 10 buttons with same logical name and all properties are same, in different locations. now i want to write code to click on 6 button .
Printable View
[b]Question asked by visitor[/b]
If there are 10 buttons with same logical name and all properties are same, in different locations. now i want to write code to click on 6 button .
As of my understanding I suppose using Virtual buttons would help u out..Because it will recognise on the name given by us..
Correct me if im wrong!!
Hi,
No need to use virtual objects. use descriptive programming. The code would be something like:
Browser("Name").page("Name").Link("ClassName:=WebLink", "Name:=[COLOR="Red"]LogicalName[/COLOR]", "index:=5").click
This should work. Also, note that index starts with 0.
U r right ganesh ..Actually i did that but i forgot to tell him..
Anyway thanks for reminding
Absolutely right..... Just that there is no need to give the property "ClassName".
Because, when you write "Browser("Name").page("Name").WebLink/WebButton" it is already identified as a Weblink or WebButton.
So you can just write....
Browser("Name").Page("Name").WebButton("Name:=LogicalName", "index:=5").click
Thanks ganesh it is very use full to me
Browser("Name").Page("Name").WebButton("Name:=LogicalName", "index:=5").click
Change the index property and see.
It will work.
Arun*
Can you please let me know the code how to do the above scenario for a Windows based application?
Thanks for the information.It really helped me