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'