Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DeprecationWarning: find_element_by_xpath is deprecated. Please use find_element(by=By.XPATH, value=xpath) instead username = driver.find_element_by_xpath("//input[@name='session_key']") #2

Open
olegsidokhmetov opened this issue Sep 8, 2023 · 0 comments

Comments

@olegsidokhmetov
Copy link

It seems ... ..that the find_element_by_* commands are deprecated in the latest Selenium Python libraries.

[12028:7912:0908/135707.814:ERROR:socket_manager.cc(141)] Failed to resolve address for stun.l.google.com., errorcode: -105
c:\Users\Alik\Downloads\Linkedin_ConnectingBot.py:10: DeprecationWarning: find_element_by_xpath is deprecated. Please use find_element(by=By.XPATH, value=xpath) instead
username = driver.find_element_by_xpath("//input[@name='session_key']")
c:\Users\Alik\Downloads\Linkedin_ConnectingBot.py:11: DeprecationWarning: find_element_by_xpath is deprecated. Please use find_element(by=By.XPATH, value=xpath) instead
password = driver.find_element_by_xpath("//input[@name='session_password']")
c:\Users\Alik\Downloads\Linkedin_ConnectingBot.py:17: DeprecationWarning: find_element_by_xpath is deprecated. Please use find_element(by=By.XPATH, value=xpath) instead
submit = driver.find_element_by_xpath("//button[@type='submit']").click()
c:\Users\Alik\Downloads\Linkedin_ConnectingBot.py:30: DeprecationWarning: find_elements_by_tag_name is deprecated. Please use find_elements(by=By.TAG_NAME, value=name) instead
all_buttons = driver.find_elements_by_tag_name("button")
[12028:7912:0908/135718.838:ERROR:socket_manager.cc(141)] Failed to resolve address for stun.l.google.com., errorcode: -105
[12028:7912:0908/135722.322:ERROR:socket_manager.cc(141)] Failed to resolve address for stun.l.google.com., errorcode: -105
[12028:7912:0908/135725.456:ERROR:socket_manager.cc(141)] Failed to resolve address for stun.l.google.com., errorcode: -105
[12028:7912:0908/135728.848:ERROR:socket_manager.cc(141)] Failed to resolve address for stun.l.google.com., errorcode: -105
[12028:7912:0908/135732.443:ERROR:socket_manager.cc(141)] Failed to resolve address for stun.l.google.com., errorcode: -105
[12028:7912:0908/135735.726:ERROR:socket_manager.cc(141)] Failed to resolve address for stun.l.google.com., errorcode: -105
[12028:7912:0908/135739.498:ERROR:socket_manager.cc(141)] Failed to resolve address for stun.l.google.com., errorcode: -105
Traceback (most recent call last):

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant