I am trying to launch a site on the opera browser using the selenium java. I have tried the code below but I get an error that it is deprecated. Please I need update on how to go about this.
package donald;
// Importing All Necessary Items
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.opera.OperaDriver;
public class sweet-scrape {
public static void main(String[] args)
{
// Set the path to the OperaDriver executable
System.setProperty("webdriver.opera.driver", "C:\\Visual Studio\\WebScraper\\sweet-scraper\\drivers\\operadriver.exe");
// Creating New Object driver Of Webdriver
WebDriver driver = new OperaDriver();
// Open the website
driver.get("https://www.jiji.ng");
}
}
These are the errors I get:
The type OperaDriver is deprecated The constructor OperaDriver() is deprecated