Forums

Newer version of selenium and Firefox?

Is there any way of using newer versions of Firefox, than default Firefox17 version in selenium. I've read something about some beta features, which enable that. Am I right activating these beta features on my account should help? If so, may I ask some admin to enable them? Thanks.

The Firefox that we have installed is the only one that is likely to work at the moment. You can use the Chrome that we have installed, though - that is more recent. Have a look at https://www.pythonanywhere.com/forums/topic/21948/#id_post_76488 for how to use it. I have enabled the feature for your account.

Huge thanks! :-)

Hi can I get chrome selenium feature enabled on my account also

No problem. I have enabled it for your account.

Thank you - do i need to simply reload my web instance or do I have to delete it and create a new instance to get it working?

I am still getting this error

Traceback (most recent call last): browser = webdriver.Chrome(options=chrome_options) TypeError: init() got an unexpected keyword argument 'options'

from selenium import webdriver
from selenium.webdriver.chrome.options import Options

chrome_options = Options()
chrome_options.add_argument("--headless")
chrome_options.add_argument("--disable-gpu")
browser = webdriver.Chrome(options=chrome_options)

NVM sorted I had to explicitly pip install on v3.8

OK, glad you worked it out!

Hello, I tried to get chrome headless running on my account but I get the error

'chromedriver' executable needs to be in PATH."

Is this because I haven't got the selenium feature enabled on my account?

It looks like it's because you're on an older version of our system image -- essentially, the operating system used for your account -- and that one doesn't have chromedriver installed. We can easily switch you over to a newer image -- all of your own files and data will be safe, it will just change the OS files. But one word of warning first -- because of the changes to the point releases of Python (eg. 3.7.0 to 3.7.5), any virtualenvs you have might break -- and if you're not using virtualenvs, the pre-installed Python modules will be upgraded so that might break any code you have that relies on the old installed versions.