元素定位写法
strategy:value
strategy=value 新的定位写法,SeleniumLibrary 3 版本以上
SeleniumLibrary 支持的元素方法:
= Strategy = | = Match based on = | = Example = |
---|---|---|
id | Element id . |
id:example |
name | name attribute. |
name:example |
identifier | Either id or name . |
identifier:example |
class | Element class . |
class:example |
tag | Tag name. | tag:div |
xpath | XPath expression. | xpath://div[@id="example"] |
css | CSS selector. | css:div#example |
dom | DOM expression. | dom:document.images[5] < |