Package org.openqa.selenium

Examples of org.openqa.selenium.WebElement.clear()


    private void setAttributeNameType(String name, String type) {
        By nameCssPath = By.cssSelector("input[name='attName']");
        WebElement nameTextBox = getDriver().findElement(nameCssPath);
        nameTextBox.click();
        nameTextBox.clear();
        nameTextBox.sendKeys(name);

        By typeCssPath = By.cssSelector("input[name='type']");
        WebElement typeTextBox = getDriver().findElement(typeCssPath);
        typeTextBox.click();
View Full Code Here


        nameTextBox.sendKeys(name);

        By typeCssPath = By.cssSelector("input[name='type']");
        WebElement typeTextBox = getDriver().findElement(typeCssPath);
        typeTextBox.click();
        typeTextBox.clear();
        typeTextBox.sendKeys(type);
    }

    /**
     * Verify message displayed in QuickFix toolbar at top of the screen and click the create attribute button.
View Full Code Here

    public void TODO_testChangePageCount() throws Throwable {
        final int pageSize = 25;
        final int pageCount = 20;
        WebElement inputText = currentDriver.findElement(By.cssSelector(".pageCount"));
        inputText.clear();
        inputText.sendKeys(Integer.toString(pageCount));
        WebElement button = currentDriver.findElement(By.cssSelector(".changePageCount"));
        button.click();

        waitUntil(new ExpectedCondition<Boolean>() {
View Full Code Here

    public void TODO_testChangeCount() throws Throwable {
        // Change number of first level renderIf's to 200.
        final int numberOfRows = 200;
        WebElement inputText = currentDriver.findElement(By.cssSelector(".count"));
        inputText.clear();
        inputText.sendKeys(Integer.toString(numberOfRows));
        WebElement button = currentDriver.findElement(By.cssSelector(".changeCount"));
        button.click();

        waitUntil(new ExpectedCondition<Boolean>() {
View Full Code Here

    }

    public void TODO_testChangeNestedCount() throws Throwable {
        // Change number of second level renderIf's to 5.
        WebElement inputText = currentDriver.findElement(By.cssSelector(".nestedCount"));
        inputText.clear();
        inputText.sendKeys("5");
        WebElement button = currentDriver.findElement(By.cssSelector(".changeNestedCount"));
        button.click();
    }
}
View Full Code Here

    public WebElement findElementAndTypeEventNameInIt(String event) {
        String locatorTemplate = "input[class*='%s']";
        String locator = String.format(locatorTemplate, event);
        WebElement input = findDomElement(By.cssSelector(locator));
        input.click(); // IE7 need to bring focus
        input.clear();
        input.sendKeys(event);
        return input;
    }

    public void assertClassNameContains(WebElement element, String namePart) {
View Full Code Here

    public void testDatepickerOpensToCorrectValue() throws Exception {
        open(URL);
        // Test Begins
        // Making sure the textBox is empty so we always start at the same date
        WebElement element = findDomElement(By.cssSelector(DATE_INPUT_BOX_SEL));
        element.clear();
        element.sendKeys(TEST_DATE_TO_USE);

        // Reopening the calendar and Grabbing date directly above it, clicking on it, then verifying that it is the
        // correct date.
        openAndCheckDate(By.linkText("8"), "04/08/2013");
View Full Code Here

         */
        public void setDescriptorNames(String text) {
            By xpath = By.cssSelector("textarea[name='descriptor']");
            WebElement textBox = testCase.getDriver().findElement(xpath);
            textBox.click();
            textBox.clear();
            textBox.sendKeys(text);
        }

        /**
         * Verify the buttons you expect to see on the QuickFix screen.
View Full Code Here

  public boolean input(Identification identification, String text) {
    try {
      WebElement field = browser.findElement(identification.getWebDriverBy());
      if (field != null) {
        // first clear the field
        field.clear();
        // then fill in
        field.sendKeys(text);

        // this.activeElement = field;
        return true;
View Full Code Here

  /**
   * 在Element中输入文本内容.
   */
  public void type(By by, String text) {
    WebElement element = driver.findElement(by);
    element.clear();
    element.sendKeys(text);
  }

  /**
   * 点击Element.
 
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.