I am trying type the username and password into my University mail using Selenium module. This is the id's attribute value that I'm trying to locate:
<input id="ContentPlaceHolder1_UsernameTextBox" name="username" tabindex="1" placeholder="FAU Net ID" value="" autocomplete="false" type="text">
Here's how I'm trying to find it in my program:
userElem = browser.find_element_by_id('ContentPlaceHolder1_UsernameTextBox')
But this is the error that I'm running into:
Exception -:
Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
emailElem = browser.find_element_by_id('ContentPlaceHolder1_UsernameTextBox')
File "C:\Python\Python35\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 269, in find_element_by_id
return self.find_element(by=By.ID, value=id_)
File "C:\Python\Python35\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 752, in find_element
'value': value})['value']
File "C:\Python\Python35\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 236, in execute
self.error_handler.check_response(response)
File "C:\Python\Python35\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 192, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchElementException: Message: Unable to locate element: [id="ContentPlaceHolder1_UsernameTextBox"]
Thanks and any help would be greatly appreciated.
EDIT:
for reference this is the page
find_element_by_name()function too? You could try that one also, if not usexpath