Last active
April 3, 2024 21:11
-
-
Save kntjspr/99a6e36abc4f23b6bb7ba0826a69a4da to your computer and use it in GitHub Desktop.
Selenium deprecated methods
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://github.com/SeleniumHQ/selenium/pull/10712 | |
.find_element_by_class_name( | |
.find_element(By.CLASS_NAME, | |
.find_element_by_css_selector( | |
.find_element(By.CSS_SELECTOR, | |
.find_element_by_id( | |
.find_element(By.ID, | |
.find_element_by_link_text( | |
.find_element(By.LINK_TEXT, | |
.find_element_by_name( | |
.find_element(By.NAME, | |
.find_element_by_partial_link_text( | |
.find_element(By.PARTIAL_LINK_TEXT, | |
.find_element_by_tag_name( | |
.find_element(By.TAG_NAME, | |
.find_element_by_xpath( | |
.find_element(By.XPATH, | |
// driver.find_element(By.XPATH, //a[text()='Button name']) | |
.find_elements_by_class_name( | |
.find_elements(By.CLASS_NAME, | |
.find_elements_by_css_selector( | |
.find_elements(By.CSS_SELECTOR, | |
.find_elements_by_id( | |
.find_elements(By.ID, | |
.find_elements_by_link_text( | |
.find_elements(By.LINK_TEXT, | |
.find_elements_by_name( | |
.find_elements(By.NAME, | |
.find_elements_by_partial_link_text( | |
.find_elements(By.PARTIAL_LINK_TEXT, | |
.find_elements_by_tag_name( | |
.find_elements(By.TAG_NAME, | |
.find_elements_by_xpath( | |
.find_elements(By.XPATH, | |
You'll also need to import By if you haven't already done so: | |
from selenium.webdriver.common.by import By |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment