Results 1 to 9 of 9

Thread: Code to click on 6 button

  1. #1
    Geek_Guest
    Guest

    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 .


  2. #2
    Contributing Member
    Join Date
    Feb 2007
    Answers
    61

    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!!


  3. #3
    Contributing Member
    Join Date
    Feb 2007
    Answers
    48

    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.


  4. #4
    Contributing Member
    Join Date
    Feb 2007
    Answers
    61

    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


  5. #5
    Expert Member
    Join Date
    Apr 2007
    Answers
    147

    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


  6. #6
    Junior Member
    Join Date
    Jul 2007
    Answers
    3

    Re: Code to click on 6 button

    Thanks ganesh it is very use full to me


  7. #7
    Contributing Member
    Join Date
    Feb 2006
    Answers
    41

    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*


  8. #8
    Junior Member
    Join Date
    Apr 2007
    Answers
    10

    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?


  9. #9
    Contributing Member
    Join Date
    Nov 2006
    Answers
    76

    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
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact