开发者

How to identify the element name in selenium

开发者 https://www.devze.com 2023-02-04 13:24 出处:网络
The element to match is as follows: ... some html.... <table> some <tr\'s> <tr><td>\"caption in a <a> tag\"</td><td> result value here </td></tr>

The element to match is as follows:

... some html....

<table>
some <tr's>
<tr><td>"caption in a <a> tag"</td><td> result value here </td></tr>
more <tr's>

.... more html

I'm using Selenium IDE but don't see a way 开发者_开发百科to match/capture the result value text anywhere ?


Given

<yyy name="iggy" caption="abcd" level="20"></yyy>

you would want to use

assertAttribute("iggy@caption", "abcd")

This uses the name as a locator and @caption to specify the attribute you want. You could follow it with

assertAttribute("iggy@level", "20")

to check the level attribute. You might use 'validateAttribute' instead of 'assertAttribute'. If you want to capture the attribute value use 'storeAttribute'.

0

精彩评论

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