More details may help. Did you receive an error message? How is your code?
In any case, some ideas that may help figure out what is going on:
Set the window size for something suitable for your tests.
driver.set_window_size(900, 800)
Save screenshots.
driver.save_screenshot('screen.png')
Check if the page source meets your expectations.
with open('temp.html', 'w') as f: f.write(driver.page_source)
You can try to find out if updating Selenium helps.
pip install selenium
You can test other versions of PhantomJS by downloading and specifying a path. Version 1.9.8 has helped me circumvent some security restrictions in the past.
driver = webdriver.PhantomJS( executable_path='/path/to/the/downloaded/phantomjs19', # you can specify args, such as: service_args=[ '--ignore-ssl-errors=true', '--ssl-protocol=any', '--web-security=false', ], # and also other capabilities: desired_capabilities={ 'phantomjs.page.settings.resourceTimeout': '5000', 'phantomjs.page.settings.userAgent': ( "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/53 " "(KHTML, like Gecko) Chrome/15.0.87" ), }, )
Please let me know if this helps!
source share