Jump to content

Recommended Posts

Posted

I want to click on IE Button using Index number, Because it have same id, and i am not able to click on using text becuase text is change every time.

My Source code is :

<table class="table table-hover table-bordered">

<tr title="" id="btnselect" onclick="functionSubmit(Random,1,'Random','Random','Random');" data-original-title="Please Select One" data-toggle="tooltip" data-placement="bottom">

<tr title="" id="btnselect" onclick="functionSubmit(Random,2,'Random','Random','Random');" data-original-title="Please Select One" data-toggle="tooltip" data-placement="bottom">

<tr title="" id="btnselect" onclick="functionSubmit(Random,3,'Random','Random','Random');" data-original-title="Please Select One" data-toggle="tooltip" data-placement="bottom">

<tr title="" id="btnselect" onclick="functionSubmit(Random,4,'Random','Random','Random');" data-original-title="Please Select One" data-toggle="tooltip" data-placement="bottom">

I want to click on third 'btnselect'.

Posted

One way .... use _IETagnameGetCollection with tr tag, than put a counter inside a loop for next, and read the exact values, in your array is $btnselect [2].
 

  • 2 weeks later...
Posted
On 5/6/2018 at 7:54 PM, rootx said:

One way .... use _IETagnameGetCollection with tr tag, than put a counter inside a loop for next, and read the exact values, in your array is $btnselect [2].
 

@rootx How can i use this? Please post example

Posted
5 minutes ago, iamtech said:

@junkew it was showing text inside tr code, my question is how to click on it if same text, same id, same tittle.

Post your code before.

Posted

How can i click on third button if button have same id?

 

<table class="table table-hover table">

<tr title="" id="btnselection" onclick="functionSubmit(Random,1,'Random','Random','Random')

<tr title="" id="btnselection" onclick="functionSubmit(Random,2,'Random','Random','Random')

<tr title="" id="btnselection" onclick="functionSubmit(Random,3,'Random','Random','Random') ;i want to click on this button

<tr title="" id="btnselection" onclick="functionSubmit(Random,4,'Random','Random','Random')
Posted

Technically they shouldn't have the same ID, but that's fine. How do you know which one to click on while looking at the page?  if you're really just going based on index, you can use IETagNameGetCollection() to return a collection of elements with that tag and then step through them until you find the one you're looking for.

Posted
6 hours ago, seandisanti said:

Technically they shouldn't have the same ID, but that's fine. How do you know which one to click on while looking at the page?  if you're really just going based on index, you can use IETagNameGetCollection() to return a collection of elements with that tag and then step through them until you find the one you're looking for.

@seandisanti

i want to click on third row of my table

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...