Package org.uiautomation.ios

Examples of org.uiautomation.ios.IOSCapabilities


  @BeforeClass
  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


  }

  private IOSCapabilities loadCapabilities() {
    WebDriverLikeRequest request = executor.buildRequest(WebDriverLikeCommand.GET_SESSION);
    Map<String, Object> c = executor.execute(request);
    return new IOSCapabilities(c);
  }
View Full Code Here

  public IOSCapabilities getCapabilities() {
    Capabilities cap = super.getCapabilities();
    if (cap == null) {
      return null;
    }
    IOSCapabilities ioscap = new IOSCapabilities(cap.asMap());
    return ioscap;
  }
View Full Code Here

    stopDriver();
  }

  @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);
View Full Code Here

    Assert.assertEquals(driver.getWindowHandles().size(), 1);
  }

  @Test
  public void canSwitchToTheWebViewAndFindByCSS() throws Exception {
    IOSCapabilities safari = IOSCapabilities.iphone("UICatalog");
    safari.setCapability(IOSCapabilities.TIME_HACK, false);

    driver = new RemoteIOSDriver(getRemoteURL(), SampleApps.uiCatalogCap());
    Set<String> handles = driver.getWindowHandles();
    Assert.assertEquals(handles.size(), 1);
    UIAElement webCell =
View Full Code Here

  }

  @Test
  //(enabled = false)
  public void nativeWebViewSeesNewPages() throws Exception {
    IOSCapabilities safari = IOSCapabilities.iphone("UICatalog");
    safari.setCapability(IOSCapabilities.TIME_HACK, false);

    driver = new RemoteIOSDriver(getRemoteURL(), SampleApps.uiCatalogCap());
    Set<String> handles = driver.getWindowHandles();
    Assert.assertEquals(handles.size(), 1);
    UIAElement webCell =
View Full Code Here

  @Test(dataProvider = "capabilities")
  public void testSendingKeyboardEventsShouldAppendTextInInputsMultipleDeviceFamilyAndOrientation(
      DeviceType device,
      DeviceVariation variation) throws Exception {

    IOSCapabilities cap = new IOSCapabilities();

    cap.setCapability(DEVICE, device);
    cap.setDeviceVariation(variation);

    cap.setCapability(LANGUAGE, "en");
    cap.setCapability(LOCALE, "en_GB");
    cap.setCapability(BUNDLE_NAME, "Safari");
    RemoteIOSDriver driver = null;
    try {
      driver = new RemoteIOSDriver(new URL(url), cap);

      for (Orientation o : getOrientationForDevice(device)) {
View Full Code Here

    Configuration.SIMULATORS_ENABLED = true;

    final IOSServerManager mgr = new IOSServerManager(config);
    addSafari(mgr, new StringBuilder());

    IOSCapabilities saf = IOSCapabilities.iphone("Safari");
    ServerSideSession session = mgr.createSession(saf);
    Assert.assertEquals(mgr.getSessions().size(), 1);
    Thread t = new Thread(new Runnable() {
      @Override
      public void run() {
View Full Code Here

    Configuration.SIMULATORS_ENABLED = true;

    final IOSServerManager mgr = new IOSServerManager(config);
    addSafari(mgr, new StringBuilder());

    IOSCapabilities saf = IOSCapabilities.iphone("Safari");
    ServerSideSession session = mgr.createSession(saf);
    Assert.assertEquals(mgr.getSessions().size(), 1);
    Thread t = new Thread(new Runnable() {
      @Override
      public void run() {
View Full Code Here

public class ServerSerializeExceptionTest extends BaseIOSDriverTest {

  @Test(expectedExceptions = WebDriverException.class)
  public void clientGetsServerException() {
    IOSCapabilities cap = SampleApps.intlMountainsCap("de");
    driver = new RemoteIOSDriver(getRemoteURL(), cap);
  }
View Full Code Here

TOP

Related Classes of org.uiautomation.ios.IOSCapabilities

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.