webDriver API——第6部分Locate elements By

These are the attributes which can be used to locate elements. See the Locating Elements chapter for example usages.

The By implementation.

class selenium.webdriver.common.by.By

Bases: object

Set of supported locator strategies.

classmethod is_valid(by)
CLASS_NAME= 'class name'
CSS_SELECTOR= 'css selector'
ID= 'id'
LINK_TEXT= 'link text'
NAME= 'name'
PARTIAL_LINK_TEXT= 'partial link text'
TAG_NAME= 'tag name'
XPATH= 'xpath'
上一篇:MT【173】齐次消元单变量


下一篇:里面的div怎么撑开外面的div,让高度自适应