find_elements returns a list of all elements matching the attribute `selector`. Shortcut to `driver.find_elements(By.CSS_SELECTOR, ...)`. args: - attribute: the attribute type to search for, aligns with the Selenium API's `By` class. default "CSS_SELECTOR"
(self, selector, attribute="CSS_SELECTOR")
| 254 | return self.driver.find_element(getattr(By, attribute.upper()), selector) |
| 255 | |
| 256 | def find_elements(self, selector, attribute="CSS_SELECTOR"): |
| 257 | """find_elements returns a list of all elements matching the attribute |
| 258 | `selector`. Shortcut to `driver.find_elements(By.CSS_SELECTOR, ...)`. |
| 259 | args: |
| 260 | - attribute: the attribute type to search for, aligns with the Selenium |
| 261 | API's `By` class. default "CSS_SELECTOR" |
| 262 | valid values: "CSS_SELECTOR", "ID", "NAME", "TAG_NAME", |
| 263 | "CLASS_NAME", "LINK_TEXT", "PARTIAL_LINK_TEXT", "XPATH" |
| 264 | """ |
| 265 | return self.driver.find_elements(getattr(By, attribute.upper()), selector) |
| 266 | |
| 267 | def _get_element(self, elem_or_selector): |
| 268 | if isinstance(elem_or_selector, str): |
no outgoing calls