Hello,
If you are looking for Firefox, please see this link
For some purpose I had to run different versions of google chrome using selenium python. I used different versions of chromes from here. A discussion on stackoverflow can be found here
If you are looking for Firefox, please see this link
For some purpose I had to run different versions of google chrome using selenium python. I used different versions of chromes from here. A discussion on stackoverflow can be found here
I extracted the compressed file and moved the chrome.exe file inside the directory with version name. Please see the screenshot below. Notice the chrome executable in this directory. I downloaded few more versions and did same with them.
Then I places those inside the following directory:
C:\Program Files (x86)\Google\Chrome
Then I had to use binary_location as below. I had four different versions as shown in the image above. Out of them, one was randomly picked using random.choice() method and the binary_location was created on runtime.
from selenium import webdriver
import random
chrome_options = webdriver.ChromeOptions()
available_versions = ['56.0.2924.87', '57.0.2987.133', '58.0.3029.96', '55.0.2883.75']
version_to_use = random.choice(available_versions)
log.warn('Running %s version' % version_to_use)
chrome_options.binary_location = r'C:\\Program Files (x86)\\Google\\Chrome\\%s\\chrome.exe' % version_to_use
driver = webdriver.Chrome(chrome_options=chrome_options)
driver.get('http://www.google.com')
You can go to Help > About Google Chrome and confirm the version.
Hope this helps everyone. :)
Good luck
Comments
Post a Comment