14

I would like to run my Selenium WebDriver tests on Opera, but when I had a look at the Opera driver at Selenium HQ and GitHub page, it says:

Opera Driver requires Opera 12.x and older versions

Note that OperaDriver is only compatible with Presto-based Operas up until 12.16. Blink-based Operas (15 and onwards) are not supported.

Opera is now up to version 22.0, so far beyond the maximum supported version of 12. So, my questions are: -

  1. If there is no Opera driver for Selenium, then how does one automate Opera tests?
  2. It seems strange to stop at version 12, even taking the underlying technology change into account. Is Opera support waning or is it that Selenium WebDriver is no longer the best tool?
Community
  • 1
  • 1
acarlon
  • 16,764
  • 7
  • 75
  • 94
  • You can download OperaDriver from here based on your OS: https://github.com/operasoftware/operachromiumdriver/releases – Ripon Al Wasim Apr 27 '16 at 13:02
  • the latest version only support opera ver.62 so what about the opera ver.63 if it's already used in computer's client, any clue how to deal with this? – gumuruh Sep 02 '19 at 02:29

3 Answers3

8

Opera has just released an early beta of WebDriver for their Blink based browsers. See https://github.com/operasoftware/operachromiumdriver

To quote from the link provided:

OperaChromiumDriver can be used without extra setup on Chromium-based versions of Opera starting from version 26. For driving Presto-based Opera browsers, refer to the OperaPrestoDriver project.

Although versions earlier than 26 aren't officially supported, the OperaChromiumDriver v. 0.1.0 works with Opera 25. On Windows using the 'binary' option in 'operaOptions' may be needed.

Ela Makiej
  • 81
  • 1
  • 4
  • This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). – user3473830 Nov 08 '14 at 03:43
  • @user3473830 - I think that this answers my question at least going forward. I have updated it with information from the site. Am I missing something? – acarlon Nov 08 '14 at 04:42
  • Thanks, I will try it out when version 26 comes out. – acarlon Nov 08 '14 at 04:42
  • Added info about Opera 25 – Ela Makiej Nov 08 '14 at 18:50
4

Download OperaDriver from here and write the following code for java:

System.setProperty("webdriver.opera.driver", "D:/Ripon/operadriver_win64/operadriver.exe");
WebDriver driver = new OperaDriver();
driver.get("https://duckduckgo.com/");
Ripon Al Wasim
  • 36,924
  • 42
  • 155
  • 176
2

1 & 2)

There are 2 types of Opera - Java Based and Chrominium based.

The provided links are for Java based Opera.

https://github.com/operasoftware/operadriver#desktop

There is no official support for latest Opera versions.

Purus
  • 5,701
  • 9
  • 50
  • 89