How to use OperaChromiumDriver for Opera version> 12.X

I understand that Operachromiumdriver was developed to work on versions> 12.X. At the same time, I couldn't get this to work. I downloaded the operating system version operachromiumdriver.exe from https://github.com/operasoftware/operachromiumdriver/releases to no avail. Can someone help me with this. Please tell me if I understand correctly.

thank

+3


source to share


3 answers


I found a solution managing operation 25+ using OperaChromiumDriver.exe.

  • Install Opera 25+ (I installed Opera 25)
  • Download OperaChromiumDriver https://github.com/operasoftware/operachromiumdriver/releases
  • Extract the zip file to a folder on your computer.
  • Use the following code to open Opera

    System.setProperty("webdriver.chrome.driver", "C:/Users/user/Downloads/operadriver-0.1.0-win32/operadriver-0.1.0-win32.exe");
    WebDriver driver = new ChromeDriver();
    driver.get("https://www.google.com");
    driver.findElement(By.name("q")).sendKeys("Selenium");
    
          



I have used new ChromeDriver()

. This will launch Opera as we are using OperaChromiumDriver

. I think this is because the new Opera is based on Chromium and OperaChromiumDriver is a WebDriver implementation derived from ChromeDriver. [Cm. https://github.com/operasoftware/operachromiumdriver] .

Hope this helps you.

+4


source


OperaChromiumDriver now works with Opera 26+, but only with a remote instance so far ... Download and run the appropriate binary from

OperaChromiumDriver binary releases



They have examples for desktop versions in python, but here's what worked for me in Java. Many ChromeOptions don't work, although they say they should ... you'll need to check for sure, but setBinary works.

DesiredCapabilities capabilities = DesiredCapabilities.opera();

ChromeOptions options = new ChromeOptions();
options.setBinary("/path/to/opera");

capabilities.setCapability(ChromeOptions.CAPABILITY, options);

driver = new RemoteWebDriver(new URL("http://127.0.0.1:9515"),capabilities);

      

+1


source


Operachromiumdriver

Download selenium Drivers . Since they are not a direct operative driver, OperaChromiumDriver is based on ChromeDriver, so we use ChromeOptions to set the binary location of operadriver.exe

Chrome versions of Opera starting from version 26.

String operaChromiumDriver = "E:\\Drivers\\operadriver.exe";
String operaBrowserLocation = "C:\\......\\opera.exe"

System.setProperty("webdriver.opera.driver", operaChromiumDriver);

ChromeOptions options = new ChromeOptions();
options.setBinary(operaBrowserLocation);        

DesiredCapabilities capabilities = new DesiredCapabilities();
capabilities.setCapability(ChromeOptions.CAPABILITY, options);
OperaDriver browser = new OperaDriver(capabilities);

WebDriver driver =browser;
driver.get("https://in.yahoo.com/");

      

thanks to Lukus Answer (1) to complete my work.

+1


source







All Articles