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 import webdriver
driver.get('http://sugang.korea.ac.kr')
Added implicitly wait to prevent the code from executing before the page fully loads.
driver.implicitly_wait(30)
Code for adding username and password is as below
driver.find_element_by_name('id').send_keys('abc')
driver.find_element_by_name('pw').send_keys('cdef')
But getting below error
NoSuchElementException: Message: no such element: Unable to locate element: {"method":"id","selector":"id"}
please. help me ^^
No Such Element Exception usually comes when web driver can't see the element you are trying to perform an action on. Reason's can be:
your ID or Name or Xpath or CssSelector can be wrong.
Your element might be inside an an iframe so that web driver can't see or detect it. Switch to an iframe through Selenium and python