Package org.openqa.selenium.remote

Examples of org.openqa.selenium.remote.RemoteWebDriver.findElement()


        // 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]"));
View Full Code Here


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

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

      }

      // watch
View Full Code Here

      }

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

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

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

        }
      }

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

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

      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 {
View Full Code Here

    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

    Criteria
        c =
        new AndCriteria(new TypeCriteria(UIAStaticText.class), new NameCriteria("Show Simple"));
    UIAElement el = driver.findElements(c).get(1);
    try {
      d.findElement(By.className("UIAAlert"));
      Assert.fail("should not find alert when there isn't any");
    } catch (NoSuchElementException e) {
      //ignore
    }
View Full Code Here

    }

    // opens an alert.
    el.tap();

    WebElement rwe = d.findElement(By.className("UIAAlert"));
    String json = rwe.getAttribute("tree");
    JSONObject tree = new JSONObject(json);
    Assert.assertEquals(tree.getString("type"), "UIAAlert");
    // IOS 6. Alert OK buttons are buttons.
    String version = driver.getCapabilities().getSDKVersion();
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.