Closed
Solved
Not able to identify dynamically generated buttons using GetClones method
There is a web page with multiple submit buttons. I am using GetClones method to get the collection of the buttons. 1. I need to click on each button. There is no difference in any HTML property on each of the submit buttons (I have provided the element HTML below).
2. There is only a difference in the number in the javascript function they call.
<input class="btn btn_green" onclick="confJobSubmit("3","20","checkBox_20");" type="button" value="Submit">
</input>
<input class="btn btn_green" onclick="confJobSubmit("3","50","checkBox_50");" type="button" value="Submit">
</input>
3. Click of each submit button is refreshing the web page and so the clone collection is changing.
Show More
There is a web page with multiple submit buttons. I am using GetClones method to get the collection of the buttons. 1. I need to click on each button. There is no difference in any HTML property on each of the submit buttons (I have provided the element HTML below).
2. There is only a difference in the number in the javascript function they call.
<input class="btn btn_green" onclick="confJobSubmit("3","20","checkBox_20");" type="button" value="Submit">
</input>
<input class="btn btn_green" onclick="confJobSubmit("3","50","checkBox_50");" type="button" value="Submit">
</input>
3. Click of each submit button is refreshing the web page and so the clone collection is changing. So I cannot use the key property of each button to do the PerformClick.
4 The keys are changing on each refresh. If there is no way to identify the Submit buttons uniquely then we cannot click on each of the buttons.
5. The current match rule is looking at the type and value, which is same for all the four submit buttons, so all the submit buttons are matching this match rule. The buttons can be one or variable in number as they are dynamically generated, so I cannot create different controls for them.
There is no unique Element ID for each button. Please let me know how to differentiate between the buttons.
***Edited by Moderator Marissa to update SR Details***
Show Less