Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
menu search
person
Welcome To Ask or Share your Answers For Others

Categories

I understand that to work on opera versions > 12.X, Operachromiumdriver has been developed. At the same time I couldn't get this to work. I downloaded the windows version of operachromiumdriver.exe from https://github.com/operasoftware/operachromiumdriver/releases but to no avail. Can someone help me with this . Please tell me if my understanding is right.

Thanks

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
1.2k views
Welcome To Ask or Share your Answers For Others

1 Answer

I have found the solution running opera 25+ using OperaChromiumDriver.exe.

  1. Install Opera 25+ (I installed Opera 25)
  2. Download OperaChromiumDriver https://github.com/operasoftware/operachromiumdriver/releases
  3. Extract the zip file to a location on the computer
  4. 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 start Opera since 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 [See https://github.com/operasoftware/operachromiumdriver].

Hope this helps you.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
thumb_up_alt 0 like thumb_down_alt 0 dislike
Welcome to ShenZhenJia Knowledge Sharing Community for programmer and developer-Open, Learning and Share
...