Introduction
Current implementation of OperaDriver supports only 12.x and older versions, to work on opera versions > 12.X, Operachromiumdriver has been developed.
This article describe how to use Operachromiumdriver with Selenium in Ruby / Rails.
Pre-request
Add Chrome Driver to Selenium
Steps
In short, just do what you have done in Add Chrome Driver to Selenium , just replace chrome driver with opera driver and probably need to specify more params.
Similar for remote driver.
0. Install Opera
1. Download and extract operachromiumdriver from operachromiumdriver/releases
2. Change mode
Probably need to run command below after extracted opera driver since it is not executable by default
# make opera driver executable chmod +x operadriver
3. Write another start script for opera on remote Windows
Just change
-Dwebdriver.chrome.driver
to the path of opera driver, and also use different port so can run it with chrome one.
For more information, please refer to startOpera.bat, you can run it by double-clicking start.bat / startOpera.bat on Windows, currently it uses 64 bit opera driver.
4. Write test case
Refer to add_opera_driver_test.rb
5. Test it
Added / Modified Files
add_opera_driver_test.rb
Added vendor/win_folder
References
How to use OperaChromiumDriver for opera version >12.X
Selenium and new OperaChromiumDriver
Remote WebDriver ignore certificate errors for Chrome
how to run a selenium-server-standalone?
operachromiumdriver/docs/desktop.md
No comments:
Post a Comment