Package org.openqa.selenium

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


  /**
   * Limpa o campo Login.
   */
  public void limparCampoLogin(){
    WebElement e = Webdriver.obterInstancia().findElement(By.id("login"));
    e.clear();   
  }
 
  /**
   * Inseri a senha do usuário.
   * @param senha Senha do usuário.
View Full Code Here


   * Inseri a senha do usuário.
   * @param senha Senha do usuário.
   */
  public void inserirSenha(String senha){
    WebElement e = Webdriver.obterInstancia().findElement(By.id("password"));
    e.clear();
    e.sendKeys(senha);
  }
 
  /**
   * Limpa o campo Senha.
View Full Code Here

  /**
   * Limpa o campo Senha.
   */
  public void limparCampoSenha(){
    WebElement e = Webdriver.obterInstancia().findElement(By.id("password"));
    e.clear();   
  }
 
  /**
   * Pressiona no botão Entrar.
   */
 
View Full Code Here

    return title.equals("Navigation - Annotation With Value");
  }

  public void setInputText(String value) {
    WebElement inputText = getWebDriver().findElement(By.name("form:inputtext"));
    inputText.clear();
    inputText.sendKeys(value);
  }

  public NavigationDestinationPage click() {
    getWebDriver().findElement(By.id("form:button")).click();
View Full Code Here

* @author <a href="mailto:ales.justin@jboss.org">Ales Justin</a>
*/
public class DefaultLoginHandler implements LoginHandler {
    public void login(WebDriver driver, LoginContext context) {
        WebElement email = driver.findElement(By.id("email"));
        email.clear();
        email.sendKeys(context.getEmail());
        if (context.isAdmin()) {
            driver.findElement(By.id("isAdmin")).click();
        }
        driver.findElement(By.name("action")).click();
View Full Code Here

public class AppspotLoginHandler implements LoginHandler {
    public void login(WebDriver driver, LoginContext context) {
        try {
            WebElement email = driver.findElement(By.id("Email"));
            if (email.getAttribute("readonly") == null) {
                email.clear();
                email.sendKeys(context.getEmail());
            }

            WebElement password = driver.findElement(By.id("Passwd"));
            password.sendKeys(context.getPassword());
View Full Code Here

    WebElement maxCrawlStates =
            driver.findElements(
                    By.xpath(
                            "//label[contains(text(),'Maximum Crawl States:')]/following-sibling::div/input"))
                    .get(0);
    maxCrawlStates.clear();
    maxCrawlStates.sendKeys("3");

    maxCrawlStates =
            driver.findElements(
                    By.xpath(
View Full Code Here

    WebElement pageConditionInput =
            driver.findElements(
                    By.xpath(
                            "//legend[contains(text(),'Page Conditions')]/following-sibling::table//input[@type='text']"))
                    .get(0);
    pageConditionInput.clear();
    pageConditionInput.sendKeys("crawljax");

    WebElement addANewFilter = driver.findElements(By.linkText("Add a New Filter")).get(0);
    followLink(addANewFilter);
    WebElement filterInput =
View Full Code Here

    WebElement filterInput =
            driver.findElements(
                    By.xpath(
                            "//legend[contains(text(),'State Filters')]/following-sibling::table//input[@type='text']"))
                    .get(0);
    filterInput.clear();
    filterInput.sendKeys(" ");

    WebElement addANewField = driver.findElements(By.linkText("Add a New Field")).get(0);
    followLink(addANewField);
    WebElement fieldIdInput =
View Full Code Here

    WebElement fieldIdInput =
            driver.findElements(
                    By.xpath(
                            "//legend[contains(text(),'Form Field Input Values')]/following-sibling::table//input[@type='text']"))
                    .get(0);
    fieldIdInput.clear();
    fieldIdInput.sendKeys(" ");
    WebElement fieldValueInput =
            driver.findElements(
                    By.xpath(
                            "//legend[contains(text(),'Form Field Input Values')]/following-sibling::table//input[@type='text']"))
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.