I'm trying to input a zipcode into a store website, and this works fine when I use webdriver.firefox() but does not work with PhantomJS. Instead I get an error:
NoSuchElementException: Message: {"errorMessage":"Unable to find element with id 'SL-map-search'"
This is the fairly simple code I'm using to generate the request. The set_window_size is only being used because other similar questions have suggested that this might fix the issue (it didn't).
driver = webdriver.PhantomJS()
# get address
driver.set_window_size(1920,1080)
driver.get("http://www.lowes.com/StoreLocatorDisplayView")
# select zipcode
element = driver.find_element(By.ID, 'SL-map-search')
element.send_keys(zipcode)
driver.find_element(By.ID, 'SL-map-search-submit').click()
Any help would be appreciated!
Thread.sleep()(still don't know what language you are using!) and see if that changes anything. If yes, then start playing around with proper Selenium waits.