public class WiniumDriver
extends org.openqa.selenium.remote.RemoteWebDriver
import static org.junit.Assert.assertEquals;
import org.junit.*;
import org.junit.runner.RunWith;
import org.junit.runners.JUnit4;
import org.openqa.selenium.winium.WiniumDriver;
import org.openqa.selenium.winium.WiniumDriverService;
import org.openqa.selenium.winium.DesktopOptions;
{@literal @RunWith(JUnit4.class)}
public class WiniumTest extends TestCase {
private static WiniumDriverService service;
private WebDriver driver;
{@literal @BeforeClass}
public static void createAndStartService() {
service = new WiniumDriverService.Builder()
.usingAnyFreePort()
.buildDesktopService();
service.start();
}
{@literal @AfterClass}
public static void createAndStopService() {
service.stop();
}
{@literal @Before}
public void createDriver() {
DesktopOptions options = DesktopOptions();
options.setApplicationPath("C:\\Windows\\System32\\notepad.exe");
driver = new WiniumDriver(service, options);
}
{@literal @After}
public void quitDriver() {
driver.quit();
}
{@literal @Test}
public void testSomething() {
// Rest of test
}
}
org.openqa.selenium.remote.RemoteWebDriver.RemoteTargetLocator, org.openqa.selenium.remote.RemoteWebDriver.RemoteWebDriverOptions, org.openqa.selenium.remote.RemoteWebDriver.Whenorg.openqa.selenium.WebDriver.ImeHandler, org.openqa.selenium.WebDriver.Navigation, org.openqa.selenium.WebDriver.Options, org.openqa.selenium.WebDriver.TargetLocator, org.openqa.selenium.WebDriver.Timeouts, org.openqa.selenium.WebDriver.Window| Constructor and Description |
|---|
WiniumDriver(URL remoteAddress,
WiniumOptions options)
Initializes a new instance of the
WiniumDriver lass using the specified remote address and options. |
WiniumDriver(WiniumDriverService service,
WiniumOptions options)
Initializes a new instance of the
WiniumDriver class using the specified WiniumDriverService
and options. |
WiniumDriver(WiniumOptions options)
Initializes a new instance of the
WiniumDriver class using the specified options |
close, execute, execute, executeAsyncScript, executeScript, findElement, findElement, findElementByClassName, findElementByCssSelector, findElementById, findElementByLinkText, findElementByName, findElementByPartialLinkText, findElementByTagName, findElementByXPath, findElements, findElements, findElementsByClassName, findElementsByCssSelector, findElementsById, findElementsByLinkText, findElementsByName, findElementsByPartialLinkText, findElementsByTagName, findElementsByXPath, get, getCapabilities, getCommandExecutor, getCurrentUrl, getElementConverter, getErrorHandler, getExecuteMethod, getFileDetector, getKeyboard, getMouse, getPageSource, getScreenshotAs, getSessionId, getTitle, getW3CStandardComplianceLevel, getWindowHandle, getWindowHandles, log, manage, navigate, quit, setCommandExecutor, setElementConverter, setErrorHandler, setFileDetector, setFoundBy, setLogLevel, setSessionId, startClient, startSession, startSession, stopClient, switchTo, toStringpublic WiniumDriver(WiniumOptions options)
WiniumDriver class using the specified optionsoptions - Thre WiniumOptions to be used with the Winium driver.public WiniumDriver(WiniumDriverService service, WiniumOptions options)
WiniumDriver class using the specified WiniumDriverService
and options.service - The WiniumDriverService to use.options - The WiniumOptions used to initialize the driver.public WiniumDriver(URL remoteAddress, WiniumOptions options)
WiniumDriver lass using the specified remote address and options.remoteAddress - URL containing the address of the WiniumDriver remote server (e.g. http://127.0.0.1:4444/wd/hub).options - The WiniumOptions object to be used with the Winium driver.Copyright © 2015. All rights reserved.