How to Run Opera Driver in Selenium Using Java? Last Updated : 14 Oct, 2022 Comments Improve Suggest changes Like Article Like Report Selenium is a well-known software used for software testing purposes. Selenium consists of three parts. One is Selenium IDE, one is Selenium Webdriver & the last one is Selenium Grid. Among these Selenium Webdriver is the most important one. Using Webdriver online website testing can be done. There are three main Webdrivers present. For the Chrome browser, ChromeDriver is present. For the Firefox browser, Gecko Driver is applicable. And for Microsoft Edge, there will be MSEdgeDriver present. Excluding these, many more drivers are present for other browsers. In this article, the process of running Opera Webdriver is implemented. It is useful for those who use Mac OS. This simple Java program can be run. Pre-Requisites:For running OperaDriver, the Java jdk version must be installed in the machine previously.The latest version of Opera should be installed.It is preferable to install Eclipse IDE on the machine so that running this code will be easier.The most important prerequisite is latest OperaDriver should be downloaded on the machine.Approach:Here, using OperaDriver, the login page of Facebook is going to open. For, that some methods need to be imported.First, the Facebook login page link is to be stored in a string.Then in the program, the property of the browser is to be set. setProperty() method is going to be used here.In the setProperty() method, the first argument is to be the Webdriver that is to be going to use. Here, using OperaDriver specifically that argument have to be passed. And in the second argument, the location of OperaDriver.exe is to be passed. Note: In this case, OperaDriver.exe is stored in Eclipse, so maybe the location seems different. But also, a complete File Explorer path can also be passed. Then a new object called driver should be implemented which is a type of WebDriver. Here, in this case, it will be OperaDriver.Then using that driver object, the get() method will be used. This get() method of WebDrivers helps to open some URLs provided.Here the login page of Facebook is going to be opened. So, only the string where the URL has been stored will be passed. Executing this method will go to open a new Chrome window.Then the sleep() method is going to be implemented. This delays the programs for some time. So that the output can be visible easily.At last, the opened Opera window has to be closed. For that reason, the quit() method is going to be implemented. Below is the complete implementation of the above approach: Java // Importing All Necessary Items import java.io.*; import java.lang.Thread; import org.openqa.selenium.WebDriver; import org.openqa.selenium.opera.OperaDriver; public class FacebookLoginPage { public static void main(String[] args) { // Try-Catch Block For Implementing Sleep Method try { // String Where Home Page URL Is Stored String baseUrl = "https://www.facebook.com/"; // Implementation of SetProperty Method System.setProperty("webdriver.opera.driver", "test/resources/operadriver.exe"); // Creating New Object driver Of Webdriver WebDriver driver = new OperaDriver(); // Calling the Home Page By Using Get() Method driver.get(baseUrl); // Delaying The Output Thread.sleep(2000); // Closing The Opened Window driver.quit(); } catch (Exception e) { // Catching The Exception System.out.println(e); } } } Output: If the above code is run, then a new Opera Window will be opened. Hence, the process is completed successfully. Â Comment More infoAdvertise with us Next Article How to Run Opera Driver in Selenium Using Java? sounetraghosal2000 Follow Improve Article Tags : Java Software Testing Selenium Practice Tags : Java Similar Reads How to Run Gecko Driver in Selenium Using Java? Selenium is a well-known software used for software testing purposes. It consists of three parts: Selenium IDE, Selenium WebDriver, and Selenium Grid. Selenium WebDriver is the most important. Using WebDriver, online website testing can be done. There are three main WebDriver implementations:ChromeD 5 min read How to Run Safari Driver in Selenium Using Java? Selenium is a well-known software used for software testing purposes. Selenium consists of three parts: Selenium IDE, Selenium Webdriver, and Selenium Grid. Among these, Selenium Webdriver is the most important one. Using Webdriver, online website testing can be done. There are three main Webdrivers 4 min read How to Open Chrome Browser Using Selenium in Java? Selenium is an open-source popular web-based automation tool. The major advantage of using selenium is, it supports all browsers like Google Chrome, Microsoft Edge, Mozilla Firefox, and Safari, works on all major OS, and its scripts are written in various languages i.e Java, Python, JavaScript, C#, 3 min read How to Run Internet Explorer Driver in Selenium Using Java? Selenium is a well-known software used for software testing purposes. Selenium consists of three parts. One is Selenium IDE, one is Selenium Webdriver & the last one is Selenium Grid. Among these Selenium Webdriver is the most important one. Using Webdriver online website testing can be done. Th 6 min read How to Open Microsoft Edge Browser using Selenium in Java? Selenium is an open-source popular web-based automation tool. The major advantage of using selenium is, it supports all browsers like Google Chrome, Microsoft Edge, Mozilla Firefox, and Safari, works on all major OS and its scripts are written in various languages i.e Java, Python, JavaScript, C#, e 3 min read How to Run Edge Driver in Selenium Using Eclipse? Selenium is a well-known software used for software testing purposes. Selenium consists of 3 parts. One is Selenium IDE, one is Selenium Webdriver & the last one is Selenium Grid. Among these Selenium Webdriver is the most important one. Using webdriver online website testing can be done. There 3 min read How to download File in Selenium Using java Automating the file download process is essential in web automation testing, especially for validating functionalities involving document downloads such as PDFs, images, or CSV files. However, Selenium WebDriver doesnât directly handle file downloads. To overcome this limitation, we can configure th 2 min read How to click on an image using Selenium in Java? Selenium, a popular tool for automating web application testing across browsers, often requires image interaction. In this article we will discuss how to clicking on image using Selenium in Java.PrerequisitesJava Development Kit (JDK) installed.Selenium WebDriver library added to your project.A supp 3 min read How to Handle Alert in Selenium using Java? Imagine filling out a form online and accidentally missing some information. You only know if you made a mistake if the website tells you somehow, like with a pop-up message. This article explains what those pop-up messages are called in Selenium (alerts) and how to deal with them in your automated 5 min read How do I pass options to the Selenium Chrome driver using java? Selenium WebDriver is a widely used tool for automating web browsers. When working with Selenium ChromeDriver, passing custom options to the browser allows you to tailor the browsing experience based on your test requirements. Whether you're running tests in headless mode, disabling notifications, o 2 min read Like