I'm very new to Python and Selenium.
I'm trying to create an automated script where a page is loaded and username and password fields are completed.
When I run the automation in Selenium, it works fine (it's a simple process), but when I run it through the python server it doesn't work. The page loads, but no fields are populated.
Any help appreciated!
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import Select
from selenium.common.exceptions import NoSuchElementException
import unittest, time, re
class Pageload(unittest.TestCase):
def setUp(self):
self.driver = webdriver.Firefox()
self.driver.implicitly_wait(30)
self.base_url = "http://gymbox.com/"
self.verificationErrors = []
self.accept_next_alert = True
def test_pageload(self):
driver = self.driver
driver.get(self.base_url + "/Login")
driver.find_element_by_id("login_Email").clear()
driver.find_element_by_id("login_Email").send_keys("hello")