For some reason when I don't run headless I am able to log into http://www.neighborhoodscout.com. However when I run headless PhantomJS I am unable to login and it can't find an element it returns on success of a login.
Phantom JS version 1.9.8
driver = webdriver.PhantomJS()
driver.set_window_size(1124, 850)
driver.get(url)
time.sleep(2)
driver.find_element_by_id("login").click()
time.sleep(2)
driver.find_element_by_id("user_email").send_keys(username)
driver.find_element_by_id("user_password").send_keys(password)
time.sleep(4)
driver.find_element_by_id("login-button").click()
Why does it work for non headless vs not work for phantomjs??
There is no traceback error, it just is unable to login for some reason?
I am looking for a specific element by doing:
ele_found=EC.presence_of_element_located(driver.find_element_by_id('flash_notice')) is not None