Unable to locate element: //*[@id="ember16"]/input
toannd96 opened this issue · comments
Nguyễn Đắc Toàn commented
- Finish importing package ...
linkedin.py:18: DeprecationWarning: use options instead of firefox_options
driver = webdriver.Firefox(firefox_options=webdriver.FirefoxOptions())
- Finish opening a driver ...
- Finish importing the login credentials ...
- Keying in the username ...
- Keying in the password ...
- Finish logging in ...
Traceback (most recent call last):
File "linkedin.py", line 55, in <module>
search_field = driver.find_element_by_xpath('//*[@id="ember16"]/input')
File "/home/dactoan/py/scrapy-linkedin/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath
return self.find_element(by=By.XPATH, value=xpath)
File "/home/dactoan/py/scrapy-linkedin/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
return self.execute(Command.FIND_ELEMENT, {
File "/home/dactoan/py/scrapy-linkedin/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
self.error_handler.check_response(response)
File "/home/dactoan/py/scrapy-linkedin/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //*[@id="ember16"]/input
Phil Inzag commented
- Finish importing package ... linkedin.py:18: DeprecationWarning: use options instead of firefox_options driver = webdriver.Firefox(firefox_options=webdriver.FirefoxOptions()) - Finish opening a driver ... - Finish importing the login credentials ... - Keying in the username ... - Keying in the password ... - Finish logging in ... Traceback (most recent call last): File "linkedin.py", line 55, in <module> search_field = driver.find_element_by_xpath('//*[@id="ember16"]/input') File "/home/dactoan/py/scrapy-linkedin/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 394, in find_element_by_xpath return self.find_element(by=By.XPATH, value=xpath) File "/home/dactoan/py/scrapy-linkedin/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element return self.execute(Command.FIND_ELEMENT, { File "/home/dactoan/py/scrapy-linkedin/venv/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute self.error_handler.check_response(response) File "/home/dactoan/py/scrapy-linkedin/venv/lib/python3.8/site-packages/selenium/webdriver/remote/errorhandler.py", line 242, in check_response raise exception_class(message, screen, stacktrace) selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: //*[@id="ember16"]/input
I know this may be late, but try Python-time, and set sleep from 30 to 60