Python Forum
Selenium cant get elements from HTML(Rookie)
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Selenium cant get elements from HTML(Rookie)
#1
Hi there

I hope everyone having a great quarantine

Sorry if im breaking any rules my first thread in this forum.. so my apologises.

I been playing a bit with selenium and i install version 3.14 and the chrome driver but i been having issues getting the elements and the same type of error been showing up.


    buttonName = self.driver.find_element_by_xpath('//button[@type="submit"]')\
  File "/Library/Frameworks/Python.framework/Versions/3.8/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 "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 976, in find_element
    return self.execute(Command.FIND_ELEMENT, {
  File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/selenium/webdriver/remote/webdriver.py", line 321, in execute
    self.error_handler.check_response(response)
  File "/Library/Frameworks/Python.framework/Versions/3.8/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: no such element: Unable to locate element: {"method":"xpath","selector":"//button[@type="submit"]"}
  (Session info: chrome=80.0.3987.149)
I have been trying to get an element by Xpath, ID anything.. nothing seen to work can someone help me out??

Much appreciate it
Reply
#2
i can't make any sense out of this.
Please post
  • URL you are trying to scrape
  • Object you are trying to scrape
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  selenium returns junk instead of html klaarnou 5 2,225 Mar-27-2022, 07:20 AM
Last Post: klaarnou
  HTML multi select HTML listbox with Flask/Python rfeyer 0 4,617 Mar-14-2021, 12:23 PM
Last Post: rfeyer
  Saving html page and reloading into selenium while developing all xpaths Larz60+ 4 4,171 Feb-04-2021, 07:01 AM
Last Post: jonathanwhite1
  Using Python request without selenium on html form with javascript onclick submit but eraosa 0 3,170 Jan-09-2021, 06:08 PM
Last Post: eraosa
  Locating elements via Selenium peterjv26 2 2,468 Oct-02-2020, 07:50 AM
Last Post: peterjv26
  Python3 + BeautifulSoup4 + lxml (HTML -> CSV) - How to loop to next HTML/new CSV Row BrandonKastning 0 2,357 Mar-22-2020, 06:10 AM
Last Post: BrandonKastning
  Selenium Random Elements Id and class AgileAVS 1 3,731 Mar-01-2020, 12:31 PM
Last Post: metulburr
  Getting error when accessing elements in a modal window of an webpage using selenium sumandas89 3 8,651 Jul-13-2018, 10:44 AM
Last Post: mlieqo
  Error in Selenium: CRITICAL:root:Selenium module is not installed...Exiting program. AcszE 1 3,624 Nov-03-2017, 08:41 PM
Last Post: metulburr

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020