Examples of IOSServer


Examples of org.uiautomation.ios.IOSServer

    if (appServer != null)
      appServer.stop();
  }
 
  private void startIOSServer() throws Exception {
    server = new IOSServer(config);
    server.start();
  }
View Full Code Here

Examples of org.uiautomation.ios.IOSServer

  public void startServer() throws Exception {
    String[] args = {"-port", "4444", "-host", "localhost",
                     "-app", SampleApps.getPPNQASampleApp()};
    config = IOSServerConfiguration.create(args);

    server = new IOSServer(config);
    server.start();

    Thread.sleep(1000);

    cap = SampleApps.ppNQASampleAppCap();
View Full Code Here

Examples of org.uiautomation.ios.IOSServer

                     "-sessionTimeout", String.format("%d",sessionTimeoutInSec),
                     "-aut", SampleApps.getUICatalogFile(),
                     "-maxIdleBetweenCommands", String.format("%d", idleBetweenCommands)};
    config = IOSServerConfiguration.create(args);

    server = new IOSServer(config);
    server.start();
  }
View Full Code Here

Examples of org.uiautomation.ios.IOSServer

    BasicHttpEntityEnclosingRequest r = new BasicHttpEntityEnclosingRequest("GET", u.toExternalForm());

    HttpHost h = new HttpHost(u.getHost(), u.getPort());

    final IOSServer server = new IOSServer(config);
    server.start();


    waitForServerRun(server);
    HttpResponse response = client.execute(h, r);

    Assert.assertEquals(response.getStatusLine().getStatusCode(), 200);
    server.stopGracefully();
    ServerSideSession s = server.getDriver().createSession(IOSCapabilities.iphone("Safari"));
    Assert.assertNull(s);
    waitForServerToStop(server);

  }
View Full Code Here

Examples of org.uiautomation.ios.IOSServer

  protected Pages pages;
  protected AppServer appServer;

  @BeforeClass
  public void setup() throws Throwable {
    server = new IOSServer(config);
    server.start();
    appServer = new WebbitAppServer();
    appServer.start();
    pages = new Pages(appServer);
  }
View Full Code Here

Examples of org.uiautomation.ios.IOSServer

  private IOSServer server;

  @BeforeClass
  public void setup() throws Exception {
    String[] args = {"-port", "4444", "-host", "localhost"};
    server = new IOSServer(args);
    server.start();
  }
View Full Code Here

Examples of org.uiautomation.ios.IOSServer

public class MockGenerator {

  public static void main_tree(String[] args) throws Exception {
    String[] param = {"-port", "4444", "-host", "localhost"};
    IOSServerConfiguration config = IOSServerConfiguration.create(param);
    IOSServer server = new IOSServer(config);
    server.start();

    DeviceVariation[] iphoneVariations = {
        DeviceVariation.iPhone,
        DeviceVariation.iPhoneRetina,
        DeviceVariation.iPhoneRetina_4inch,
        DeviceVariation.iPhoneRetina_4inch_64bit
    };
    DeviceVariation[] ipadVariations = {
        DeviceVariation.iPad,
        DeviceVariation.iPadRetina,
        DeviceVariation.iPadRetina_64bit
    };

    generateAllVariations(DeviceType.iphone, iphoneVariations);
    generateAllVariations(DeviceType.ipad, ipadVariations);

    server.stop();
  }
View Full Code Here

Examples of org.uiautomation.ios.IOSServer

  }

  public static void main(String[] args) throws Exception {
    String[] param = {"-port", "4444", "-host", "localhost"};
    IOSServerConfiguration config = IOSServerConfiguration.create(param);
    IOSServer server = new IOSServer(config);
    server.start();

    RemoteWebDriver driver = null;

    URL url = new URL("http://localhost:4444/wd/hub");
    IOSCapabilities caps = IOSCapabilities.iphone("Safari");
    driver = new RemoteWebDriver(url, caps);

    HttpClient client = HttpClientFactory.getClient();
    String s = url + "/status";
    URL u = new URL(s);
    BasicHttpEntityEnclosingRequest
        r =
        new BasicHttpEntityEnclosingRequest("GET", u.toExternalForm());

    HttpHost h = new HttpHost(u.getHost(), u.getPort());
    HttpResponse response = client.execute(h, r);

    JSONObject o = Helper.extractObject(response);
    File base = new File("server/src/test/resources/mock");
    File status = new File(base, "status.json");

    FileWriter writer = new FileWriter(status);
    writer.write(o.toString(2));
    writer.close();
    driver.quit();
    server.stop();
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.