selenium in python : NoSuchElementException: Message: no such element: Unable to locate element

前端 未结 6 959
甜味超标
甜味超标 2020-11-22 08:41

I tried typing \'abc\' in the first block of id and \'cdef\' in the second block of password. However, the error code at the bottom comes up.

from selenium          


        
6条回答
  •  半阙折子戏
    2020-11-22 09:19

    I had the same error.

    Web browser was open, username and password were keyed in,but the submit button was not submitted.

    I've got the same error, read all solutions and realized that my code was submitted with submit()

    driver.find_element_by_id('loginButton').submit()
    

    I changed it to click() and the issue was solved.

    driver.find_element_by_id('loginButton').click()
    

提交回复
热议问题