We have a Ubuntu server that we use to run Selenium tests with Chrome and Firefox (I installed ChromeDriver), and also want to run tests locally on my Windows 10 computer. I want the Python code to be the same for both computers. But I did not find out how to install ChromeDriver on Windows 10? I did not find it in the documentation [1 , 2] .
Here is the code that runs the test in Chrome:
import unittest from selenium import webdriver class BaseSeleniumTestCase(unittest.TestCase): ... ... ... ... def start_selenium_webdriver(self, chrome_options=None): ... self.driver = webdriver.Chrome(chrome_options=chrome_options) ...
I also found How to run Selenium WebDriver test cases in Chrome? but it doesn't seem to be in Python (the programming language is not marked, what is it?)
Update # 1: I found Python code at https://sites.google.com/a/chromium.org/chromedriver/getting-started , but where can I put the file in Windows 10 if I want to keep the same code Python for both computers?
Update # 2: I downloaded and placed chromedriver.exe in C:\Windows and it works, but I havenβt seen anything documented anywhere.
source share