Hello,
I've used the Selium add on to create a script that logs in to our site. I get a screenshot that our page loaded through the job, but then it times out after 60 seconds. It seems like it is loading the site, but then not continuing with the rest of the steps. I've tried adjusting the wait time in the script, but that's just the timeout. I don't see any indication of what the script is waiting on? The script I'm trying to use is below.
# -*- coding: utf-8 -*-
from selenium.webdriver.firefox.webdriver import WebDriver
from selenium.webdriver.common.action_chains import ActionChains
import time, unittest
def is_alert_present(wd):
try:
wd.switch_to_alert().text
return True
except:
return False
class LSOL_Login_Loads(unittest.TestCase):
def setUp(self):
self.wd = WebDriver()
self.wd.implicitly_wait(30)
def test_LSOL_Login_Loads(self):
success = True
wd = self.wd
wd.get("http://www.landstaronline.com/Public/Login.aspx")
wd.find_element_by_id("USER").click()
wd.find_element_by_id("USER").clear()
wd.find_element_by_id("USER").send_keys("USERID")
wd.find_element_by_id("PASSWORD").click()
wd.find_element_by_id("PASSWORD").clear()
wd.find_element_by_id("PASSWORD").send_keys("PASSWORD")
wd.find_element_by_id("Submit").click()
self.assertTrue(success)
def tearDown(self):
self.wd.quit()
if __name__ == '__main__':
unittest.main()