Package org.openqa.selenium

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


    List<WebElement> link = webDriver.findElements(By.id("category_3"));
    link.get(1).click();
  }
  public void submit() {
    WebElement button = webDriver.findElement(By.id("sendButton"));
    button.submit();
  }
 
  public void addToCart(int itemNumber) {
    List<WebElement> chocolates = webDriver.findElements(By.xpath("//*[@class='btn btn-block']"));
    chocolates.get(itemNumber).click();
View Full Code Here


    webDriver.close();
  }
 
  public void submit() {
    WebElement button = webDriver.findElement(By.className("myButton"));
    button.submit();
  }

  public void fillForm(String name, String address, String store, String longitud,
      String latitud, String altitud) {
    webDriver.findElement(By.xpath("//input[@name= 'nombre']")).sendKeys(
View Full Code Here

    webDriver.close();
  }

  public void submit() {
    WebElement button = webDriver.findElement(By.id("sendButton"));
    button.submit();
  }

  public String getErrorMessage() {
    return webDriver.findElement(By.className("error")).getText();
  }
View Full Code Here

    webDriver.close();
  }
 
  public void submit() {
    WebElement button = webDriver.findElement(By.className("myButton"));
    button.submit();
  }

  public void fillForm(String nit, String name) {
    webDriver.findElement(By.xpath("//input[@name= 'nitAlmacen']")).sendKeys(
        nit);
View Full Code Here

    // IOS click takes some time to register. Need to wait for the result of that click before
    // continuing.
    waitFor(WaitingConditions.elementSelectionToBe(checkbox,true));

    checkbox.submit();

    // TODO(simon): this should not be needed, and is only here because IE's
    // submit returns too
    // soon.
View Full Code Here

    @When("I fill in the login form with username \"$username\" password \"$password\"")
    public void login(String username, String password) {
        final WebElement loginForm = portal.getLoginForm();
        loginForm.findElement(By.id("usernameField")).sendKeys(username);
        loginForm.findElement(By.id("passwordField")).sendKeys(password);
        loginForm.submit();
    }

    @Then("I see my portal page with the new user widget page")
    public void iSeeMyNewUserPortalPage() {
        final WebElement newUserDiv = portal.findElement(By.className("columns_3_newuser_static"));
View Full Code Here

    @When("I provide my OpenID password \"$openIdPassword\"")
    public void loginToOpenIdProvider(String openIdPassword) {
        final WebElement openIdLoginForm = portal.findElement(By.id("password-signin-form"));
        openIdLoginForm.findElement(By.id("password")).sendKeys(openIdPassword);
        openIdLoginForm.submit();
    }


    @When("I log out")
    public void iLogOut() {
View Full Code Here

    }

    public void sendMessage(String data) {
        WebElement form = getSendMessage();
        form.findElement(name("body")).sendKeys(data);
        form.submit();
    }

    public WebElement getSendMessage() {
        return webDriver.findElement(xpath("//form[@name = 'sendMessage']"));
    }
View Full Code Here

    }

    public void createEndpoint(String uri) {
        WebElement form = getCreateEndpointForm();
        form.findElement(name("uri")).sendKeys(uri);
        form.submit();
    }

    public WebElement getCreateEndpointForm() {
        return webDriver.findElement(xpath("//form[@name = 'createEndpoint']"));
    }
View Full Code Here

    @When("^I search for \"([^\"]*)\"$")
    public void search(String query) {
        WebElement searchField = d.findElement(By.name("q"));
        searchField.sendKeys(query);
        // WebDriver will find the containing form for us from the searchField element
        searchField.submit();
    }
}
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.