Package org.uiautomation.ios.client.uiamodels.impl

Examples of org.uiautomation.ios.client.uiamodels.impl.RemoteIOSDriver


  }

  protected final RemoteIOSDriver getDriver(IOSCapabilities cap) {
    boolean simulator = true;
    cap.setCapability(IOSCapabilities.SIMULATOR, simulator);
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
    return driver;
  }
View Full Code Here


  public void beforeClass() throws Exception {
    startIOSServer();
    startTestServer();
    IOSCapabilities safari = IOSCapabilities.iphone("Safari");
    // safari.setLanguage("fr");
    driver = new RemoteIOSDriver(new URL(url), safari);
  }
View Full Code Here

public class FlickTest extends BaseIOSDriverTest {

  @BeforeClass
  public void startDriver() {
    driver = new RemoteIOSDriver(getRemoteURL(), SampleApps.ppNQASampleAppCap());
  }
View Full Code Here

  }

  protected void startDriver(IOSCapabilities caps) throws Exception {
    stopDriver();
    // caps.setLanguage("fr");
    driver = new RemoteIOSDriver(new URL(url), caps);
  }
View Full Code Here

public class ScrollTest extends BaseIOSDriverTest {

  @BeforeClass
  public void startDriver() {
    driver = new RemoteIOSDriver(getRemoteURL(), SampleApps.ppNQASampleAppCap());
  }
View Full Code Here

  public static RemoteIOSDriver getIOSDriver(RemoteWebDriver driver) {
    if (!(driver.getCommandExecutor() instanceof HttpCommandExecutor)) {
      throw new WebDriverException("ios only supports http commandExecutor.");
    }
    HttpCommandExecutor e = (HttpCommandExecutor) driver.getCommandExecutor();
    RemoteIOSDriver
        attach =
        new AttachRemoteIOSDriver(e.getAddressOfRemoteServer(), driver.getSessionId());
    return attach;
  }
View Full Code Here

    if (useQA) {
      cap.setCapability(IOSCapabilities.IOS_SWITCHES,
                        Arrays.asList(new String[]{"-e", "useQA", "YES"}));
    }

    RemoteIOSDriver driver = new RemoteIOSDriver(new URL("http://localhost:4445/wd/hub"), cap);
    System.out.println(driver.logElementTree(null, false).toString(2));

    RemoteIOSDriver driver2 = new RemoteIOSDriver(new URL("http://localhost:4445/wd/hub"), cap);
    System.out.println(driver2.logElementTree(null, false).toString(2));
    System.out.println(driver.logElementTree(null, false).toString(2));


//    WebElement agree = driver.findElement(By.name("l10n('Agree')"));
//    agree.click();
View Full Code Here

  }


  @Test
  public void canSetTimeoutBetween2CommandsWebMode() throws InterruptedException {
    driver = new RemoteIOSDriver(getRemoteURL(), IOSCapabilities.iphone("Safari"));
    Assert.assertNotNull(driver.getCurrentUrl());
    Thread.sleep(idleBetweenCommands * 1000 - 500);
    Assert.assertNotNull(driver.getCurrentUrl());
    Thread.sleep(idleBetweenCommands * 1000 + 100);
    try {
View Full Code Here

    fail("should have timed out");
  }

  @Test
  public void canSetTimeoutBetween2CommandsNativeMode() throws InterruptedException {
    driver = new RemoteIOSDriver(getRemoteURL(), SampleApps.uiCatalogCap());

    Assert.assertNotNull(driver.findElement(By.xpath("//UIAWindow")));
    Thread.sleep(idleBetweenCommands * 1000 + 100);
    try {
      driver.findElement(By.xpath("//UIAWindow"));
View Full Code Here

  @Test
  public void canSwitchToWebView() throws Exception {
    IOSCapabilities safari = IOSCapabilities.iphone("UICatalog");
    safari.setCapability(IOSCapabilities.SIMULATOR, true);

    driver = new RemoteIOSDriver(getRemoteURL(), safari);
    Set<String> handles = driver.getWindowHandles();
    Assert.assertEquals(handles.size(), 1);

    try {
      driver.switchTo().window("Web");
View Full Code Here

TOP

Related Classes of org.uiautomation.ios.client.uiamodels.impl.RemoteIOSDriver

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.