-
Code to click on 6 button
Question asked by visitor
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 .
-
Contributing Member
Re: 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!!
-
Contributing Member
Re: Code to click on 6 button
Hi,
No need to use virtual objects. use descriptive programming. The code would be something like:
Browser("Name").page("Name").Link("ClassName:=WebLink", "Name:=LogicalName", "index:=5").click
This should work. Also, note that index starts with 0.
-
Contributing Member
Re: Code to click on 6 button
U r right ganesh ..Actually i did that but i forgot to tell him..
Anyway thanks for reminding
-
Expert Member
Re: Code to click on 6 button
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
-
Junior Member
Re: Code to click on 6 button
Thanks ganesh it is very use full to me
-
Contributing Member
Re: Code to click on 6 button
Browser("Name").Page("Name").WebButton("Name:=LogicalName", "index:=5").click
Change the index property and see.
It will work.
Arun*
-
Junior Member
Re: Code to click on 6 button
Can you please let me know the code how to do the above scenario for a Windows based application?
-
Contributing Member
Re: Code to click on 6 button
Thanks for the information.It really helped me
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules