Package org.openqa.selenium

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


    }

    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 submit the edit profile form")
    public void submitProfileForm() {
        final WebElement editAccountForm = portal.findElement(By.id("editAccountForm"));
        editAccountForm.submit();
    }
}
View Full Code Here

   @When("I search for username \"$newuser\"")
   public void searchForNewUser(String newuser) {
      WebElement searchForm=portal.findElement(By.id("userSearchForm"));
      searchForm.findElement(By.id("searchTerm")).sendKeys(newuser);
      searchForm.submit();
   }

   @Then("I see the user matches for \"$newuser\"")
   public void getUserSearchMatches() {
      WebElement searchResultsHeading=portal.findElement(By.tagName("h2"));
View Full Code Here

   @When("I delete the the user \"$newuser\"")
   public void deleteNewUser() {
      WebElement deleteUserProfileForm=portal.findElement(By.id("deleteUserProfile"));
      //Click the checkbox to confirm the deletion.
      deleteUserProfileForm.findElement(By.id("confirmdelete")).click();
      deleteUserProfileForm.submit();
   }

   //See the list of users again, search, and not find "newuser" this time.

   @Then("I see \"$deletionConfirmationStatement\"")
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 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

    webDriver.close();
  }

  public void submit() {
    WebElement button = webDriver.findElement(By.xpath("//input[@value='Registrar']"));
    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.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.xpath("//input[@value='Registrar']"));
    button.submit();
  }

  public String getErrorMessage() {
    return webDriver.findElement(By.className("error")).getText();
  }
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.