Selenium IDE: Problem to record input value with dynamic security prefix
I want to use selenium to record and click at item in a page with the following code:
<input t开发者_运维技巧ype="checkbox" onclick="HighlightRow(1, this, 3,"");" value="916242540932034325|628149" name="AID">
in Selenium IDE, recorded script:
click
//input[@name='AID' and @value='916242540932034325|628149']
However, the value 916242540932034325|628149 having security prefix "916242540932034325" which will change dynamically every time the page load.
Problems: My Recorded Script not able to RUN after page load due to the dynamic security prefix.
Help: Anyone have any suggestion for the problems I face above?
Try click //input[@name='AID' and contains(@value, '|628149')]
. As long as that's a unique combination of NAME and VALUE, you'll get what you want.
精彩评论