I am trying to auto fill the username and password text field to auto login in to my institution provided account
the python script is as followed
from selenium import webdriver
from selenium.webdriver.support import ui
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
def page_is_loaded(ion_driver):
return ion_driver.find_element_by_tag_name("body") != None
ion_driver = webdriver.Firefox()
ion_driver.get("https://muj.dvois.com")
wait = ui.WebDriverWait(ion_driver, 10)
wait.until(page_is_loaded(ion_driver))
input_field = ion_driver.find_element_by_name("username")
pass_field = ion_driver.find_element_by_name("password")
input_field.send_keys("j_169105214")
pass_field.send_keys('strawhat')
and the website is as
<tr>
<td><font align="right" class="newheaderfont">User Name</font></td> <td><input name="username" type="text"></td> </tr>
<tr>
<td><font align="right" class="newheaderfont">Password</font></td> <td><input name="password" type="password"></td> </tr>
and the error is
Traceback (most recent call last):
File "/home/vidu/PycharmProjects/untitled/autologin_ion.py", line 10, in <module>
ion_driver.get("https://muj.dvois.com")
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 250, in get
self.execute(Command.GET, {'url': url})
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 238, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: No such content frame; perhaps the listener was not registered?
Error in sys.excepthook:
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/apport_python_hook.py", line 63, in apport_excepthook
from apport.fileutils import likely_packaged, get_recent_crashes
File "/usr/lib/python3/dist-packages/apport/__init__.py", line 5, in <module>
from apport.report import Report
File "/usr/lib/python3/dist-packages/apport/report.py", line 30, in <module>
import apport.fileutils
File "/usr/lib/python3/dist-packages/apport/fileutils.py", line 23, in <module>
from apport.packaging_impl import impl as packaging
File "/usr/lib/python3/dist-packages/apport/packaging_impl.py", line 23, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
Original exception was:
Traceback (most recent call last):
File "/home/vidu/PycharmProjects/untitled/autologin_ion.py", line 10, in <module>
ion_driver.get("https://muj.dvois.com")
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 250, in get
self.execute(Command.GET, {'url': url})
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/webdriver.py", line 238, in execute
self.error_handler.check_response(response)
File "/usr/local/lib/python3.6/dist-packages/selenium/webdriver/remote/errorhandler.py", line 193, in check_response
raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.NoSuchWindowException: Message: No such content frame; perhaps the listener was not registered?
also i tried to do a facebook login it is working fine