Thursday, March 23, 2017

Windows 10 Linux Subsystem, Python selenium, selenium server

Running test scripts in WLS;
Control browser in Win10.

1) download & install selenium server:
http://www.seleniumhq.org/download/

2) download & install Google Chrome Driver
https://sites.google.com/a/chromium.org/chromedriver/

3) in python scripts, add desired capability and change webdriver.get to webdriver.Remote
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities

driver = webdriver.Remote(
   command_executor='http://127.0.0.1:4444/wd/hub',
   desired_capabilities=DesiredCapabilities.CHROME)


No comments:

Post a Comment