YandexDriver is a WebDriver implementation derived from ChromeDriver and adapted by Yandex that enables programmatic automation of Yandex.Browser. It is a part of the Selenium project.
Binaries are available under the releases tab.
- Download binary file for your platform.
- Example code for python on Windows
from selenium import webdriver
options = webdriver.ChromeOptions()
binary_yandex_driver_file = 'yandexdriver.exe' # path to YandexDriver
driver = webdriver.Chrome(binary_yandex_driver_file, options=options)
driver.get('https://yandex.ru')
driver.quit()
- Download binary file for host.
- Attach android device with Yandex.Browser to host. Check by running adb devices.
- Enable USB Web-pages debugging in Settings in Yandex.Browser.
- Example code for python on Windows host
from selenium import webdriver
options = webdriver.ChromeOptions()
binary_yandex_driver_file = 'yandexdriver.exe' # path to YandexDriver
yandex_browser_package_name = 'com.yandex.browser' # Release version of Yandex.Browser
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()