Jump to content
iamtech

How to Click on IE Button? If Button have No tiitle and Same Id.

Recommended Posts

iamtech

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'.

Share this post


Link to post
Share on other sites
rootx

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].
 

Share this post


Link to post
Share on other sites
iamtech
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

Share this post


Link to post
Share on other sites
rootx
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.

Share this post


Link to post
Share on other sites
iamtech
6 minutes ago, rootx said:

Post your code before.

I have no any code about this, because i am new for autoit

Share this post


Link to post
Share on other sites
iamtech

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')

Share this post


Link to post
Share on other sites
seandisanti

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.

Share this post


Link to post
Share on other sites
iamtech
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

Share this post


Link to post
Share on other sites
Danp2

@iamtech You have been referred to _IETagNameGetCollection multiple times, yet you haven't shown any effort on your part to solve the problem. You can't expect us to write your code for you. Please make an effort to solve this on your own. There are plenty of examples of using _IETagNameGetCollection (both in the help file and on this forum).

Share this post


Link to post
Share on other sites
JLogan3o13

@iamtech stick to one thread per topic.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

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

×