Example usage for org.openqa.selenium.opera OperaOptions setBinary

List of usage examples for org.openqa.selenium.opera OperaOptions setBinary

Introduction

In this page you can find the example usage for org.openqa.selenium.opera OperaOptions setBinary.

Prototype

public OperaOptions setBinary(String path) 

Source Link

Document

Sets the path to the Opera executable.

Usage

From source file:io.github.bonigarcia.wdm.test.OperaTest.java

License:Open Source License

@Before
public void setupTest() {
    DesiredCapabilities capabilities = DesiredCapabilities.operaBlink();
    if (IS_OS_LINUX) {
        assumeTrue("no Opera installed on Linux; well ... :-)", new File("/usr/bin/opera").exists());
        OperaOptions options = new OperaOptions();
        options.setBinary(new File("/usr/bin/opera"));
        capabilities.setCapability(OperaOptions.CAPABILITY, options);
    }/*from www.  j  a v  a 2s  .c  o  m*/
    driver = new OperaDriver(capabilities);
}

From source file:ug.lab.proj5.opera.OperaInfoTypeTest.java

@Before
@Override/*from   ww  w  . j  a va2 s  . c o m*/
public void driverSetup() {
    File file = new File("../libs/operadriver_64.exe");
    System.setProperty("webdriver.opera.driver", file.getAbsolutePath());

    OperaOptions options = new OperaOptions();
    options.setBinary("E:/Data/PortableApps/OperaPortable/App/Opera/36.0.2130.32/Opera.exe");
    //options.setBinary("E:/Data/PortableApps/OperaPortable/OperaPortable.exe");

    driver = new OperaDriver(options);
    driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
}