开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜