Package org.openqa.selenium.remote

Examples of org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions


    public void testReusableSessionId4(@Drone @Reusable WebDriver driver) {
        testReusableSessionId(driver);
    }

    private void testReusableSessionId(WebDriver d) {
        RemoteWebDriver rd = (RemoteWebDriver) d;
        if (sessionId == null) {
            sessionId = rd.getSessionId();
        } else {
            assertEquals(sessionId, rd.getSessionId());
        }
    }
View Full Code Here


    public void testReusableSessionId4(@Drone @Reusable RemoteWebDriver driver) {
        testReusableSessionId(driver);
    }

    private void testReusableSessionId(WebDriver d) {
        RemoteWebDriver rd = (RemoteWebDriver) d;
        if (sessionId == null) {
            sessionId = rd.getSessionId();
        } else {
            assertEquals(sessionId, rd.getSessionId());
        }
    }
View Full Code Here

    public void testReusableSessionId4(@Drone @Reusable WebDriver driver) {
        testReusableSessionId(driver);
    }

    private void testReusableSessionId(WebDriver d) {
        RemoteWebDriver rd = (RemoteWebDriver) d;
        if (sessionId == null) {
            sessionId = rd.getSessionId();
        } else {
            assertEquals(sessionId, rd.getSessionId());
        }

        rd.get(HUB_URL.toExternalForm());
    }
View Full Code Here

      } else if (BrowserType.chrome.name().equals(driverType)) {
        cap = DesiredCapabilities.chrome();
      }

      try {
        driver = new RemoteWebDriver(new URL(remoteUrl), cap);
      } catch (MalformedURLException e) {
        throw new RuntimeException(e);
      }
    }
View Full Code Here

          cap = DesiredCapabilities.firefox();
        }
        cap.setCapability(CapabilityType.TAKES_SCREENSHOT, true);
        cap.setCapability(CapabilityType.ACCEPT_SSL_CERTS, true);
        try {
          webDriver = new RemoteWebDriver(new URL(
              System.getProperty(SELENIUM_HUB)), cap);
          webDriver = new Augmenter().augment(webDriver);
        } catch (MalformedURLException e) {
          throw new RuntimeException(e);
        }
View Full Code Here

  public InterfaceImplementation getImplementation(Object ignored) {
    return new InterfaceImplementation() {

      public Object invoke(ExecuteMethod exec, Object self, Method method, Object... args) {
        RemoteWebDriver driver = (RemoteWebDriver) self;
        WebDriverLikeCommandExecutor executor = new WebDriverLikeCommandExecutor(driver);

        // logElementTree only has 1 method.
        File screenshot = (File) args[0];
        Boolean translation = (Boolean) args[1];
View Full Code Here

  public InterfaceImplementation getImplementation(Object ignored) {
    return new InterfaceImplementation() {

      public Object invoke(ExecuteMethod exec, Object self, Method method, Object... args) {
        RemoteWebDriver driver = (RemoteWebDriver) self;
        WebDriverLikeCommandExecutor executor = new WebDriverLikeCommandExecutor(driver);

        if ("setConfiguration".equals(method.getName())) {
          WebDriverLikeCommand command = (WebDriverLikeCommand) args[0];
          String key = (String) args[1];
View Full Code Here

  public InterfaceImplementation getImplementation(Object ignored) {
    return new InterfaceImplementation() {

      public Object invoke(ExecuteMethod exec, Object self, Method method, Object... args) {
        RemoteWebDriver driver = (RemoteWebDriver) self;
        WebDriverLikeCommandExecutor executor = new WebDriverLikeCommandExecutor(driver);
        Criteria criteria = (Criteria) args[0];

        if ("findElement".equals(method.getName())) {
          return RemoteIOSDriver.findElement(executor, criteria);
View Full Code Here

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

    RemoteWebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), cap);
    try {

      driver.manage().timeouts().implicitlyWait(45, TimeUnit.SECONDS);

      WebElement agree = driver.findElement(By.name("Agree"));
      agree.click();

      //driver.switchTo().alert().dismiss();
      WebElement signInButton = driver.findElement(By.xpath("//UIAButton[@name='Sign In']"));
      signInButton.click();
      WebElement user = driver.findElement(By.xpath("//UIATextField[@value='User ID or email']"));
      user.sendKeys(userId);
      WebElement pass = driver.findElement(By.xpath("//UIASecureTextField[@value='Password']"));
      pass.sendKeys(password);
      WebElement element4 = driver.findElement(By.xpath("//UIAButton[@name='Done']"));
      element4.click();

      Thread.sleep(2000);
      boolean cartDown = false;
      // navigate
      String itemId = "220003725262";
      if (cartDown) {
        WebElement search = driver.findElement(By.xpath("//UIAButton[@name='Search']"));
        search.click();

        //validate
        WebElement
            element1 =
            driver.findElement(By.xpath("//UIASearchBar[@value='Search Watching']"));
        element1.sendKeys(itemId);

        // check it's there.
        WebElement result = driver.findElement(By.className("UIATableCell"));
        System.out.println(result.getAttribute("name"));

      } else {
        WebElement basket = driver.findElement(By.xpath("//UIAButton[@name='Basket, 1 item']"));
        //By.xpath("//UIAButton[matches(@name,l10n('ItemCountFormatStringPlural'))]"));
        //ItemCountFormatStringSingular
        basket.click();

        //WebElement firstItem = driver.findElement(By.xpath("//UIATableCell[2]"));
        //firstItem.click();

        WebElement
            search =
            driver.findElement(By.name("Checkout"));
        search.click();

      }

      // watch
      WebElement
          paypal =
          driver.findElement(By.name("Please login to your account"));
      paypal.click();

      while (driver.getWindowHandles().size() != 3) {
        Thread.sleep(1000);
      }

      WebElement email = null;
      while (email == null) {
        try {
          driver.switchTo().window("Web_3");
          email = driver.findElement(By.id("email"));
        } catch (NoSuchElementException e) {
          Thread.sleep(1000);
          System.out.println("not found");
        }
      }

      driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);

      driver.findElement(By.cssSelector(".resetter")).click();
      email.sendKeys("ppbuild-1920977828325914@paypal.com");

      WebElement password = driver.findElement(By.id("password"));
      password.sendKeys("11111111");

      WebElement login = driver.findElement(By.id("login"));
      login.click();

      Thread.sleep(30000);

    } finally {
      driver.quit();
      server.stop();
    }


  }
View Full Code Here

    server.start();

    IOSCapabilities cap = IOSCapabilities.iphone("PayPal Here");
    cap.setCapability(IOSCapabilities.SIMULATOR, true);

    RemoteWebDriver driver = new RemoteWebDriver(new URL("http://localhost:4444/wd/hub"), cap);

    WebElement agree = driver.findElement(By.name("Sign Up for PayPal Here"));
    agree.click();

    driver.quit();
    server.stop();
  }
View Full Code Here

TOP

Related Classes of org.openqa.selenium.remote.RemoteWebDriver$RemoteWebDriverOptions

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.