diff --git a/README.md b/README.md index cfeb10c..c79d03c 100644 --- a/README.md +++ b/README.md @@ -13,14 +13,15 @@ Binaries are available under [the releases tab](https://github.com/yandex/Yandex 2. Example code for python on Windows ```python from selenium import webdriver -options = webdriver.ChromeOptions() +from selenium.webdriver.chrome.service import Service -binary_yandex_driver_file = 'yandexdriver.exe' # path to YandexDriver +service = Service(executable_path=r"/path/to/yandexdriver.exe") # Path to the Yandex Driver -driver = webdriver.Chrome(binary_yandex_driver_file, options=options) -driver.get('https://yandex.ru') +options = webdriver.ChromeOptions() + +driver = webdriver.Chrome(service=service, options=options) +driver.get("https://yandex.ru") driver.quit() - ``` @@ -41,6 +42,5 @@ options.add_experimental_option('androidPackage', yandex_browser_package_name) driver = webdriver.Chrome(binary_yandex_driver_file, options=options) driver.get('https://yandex.ru') driver.quit() - ``` - \ No newline at end of file +