Package org.openqa.selenium

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


  public void testPathParam() throws Exception {
    driver.get(applicationURL().toString());
    WebElement paramElt = driver.findElement(By.id("param"));
    WebElement formElt = driver.findElement(By.id("trigger"));
    paramElt.sendKeys(AbstractTestCase.EURO);
    formElt.submit();
    checkEuro(param.getValue());
  }

  protected abstract void checkEuro(String test);
View Full Code Here


      WebElement form = findParentForm();
      if (form == null) {
        throw new NoSuchElementException("Unable to find the containing form");
      }
      form.submit();
    } catch (IOException e) {
      throw new WebDriverException(e);
    }
  }
View Full Code Here

          // Enter something to search for
          element.sendKeys("Cheese!"); //

          // Now submit the form. WebDriver will find the form for us from the element
          element.submit();

          // Check the title of the page
          logger.info("Page title is: " + driver.getTitle());
         
          // Google's search is rendered dynamically with JavaScript.
View Full Code Here

        // Enter something to search for
        element.sendKeys("Cheese!");

        // Now submit the form. WebDriver will find the form for us from the element
        element.submit();

        // Check the title of the page
        System.out.println("Page title is: " + driver.getTitle());
    }
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

    }

    @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 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 add new widgets box")
    public void iSeeMyEmptyPortalPage() {
        final WebElement emptyPageBox = portal.getEmptyPageBox();
View Full Code Here

   public void login(String username, String password) {
      final WebElement loginForm=getLoginForm();
      loginForm.findElement(By.id("usernameField")).sendKeys(username);
      loginForm.findElement(By.id("passwordField")).sendKeys(password);
      loginForm.submit();
   }
  
   public void openIdLogin(String openIdUrl) {
      final WebElement openIdLogin=getOpenIdLoginForm();
      openIdLogin.findElement(By.id("openid_identifier")).sendKeys(openIdUrl);
View Full Code Here

   }
  
   public void openIdLogin(String openIdUrl) {
      final WebElement openIdLogin=getOpenIdLoginForm();
      openIdLogin.findElement(By.id("openid_identifier")).sendKeys(openIdUrl);
      openIdLogin.submit();
   }

   public void logout() {
      final WebElement logoutLink=findElement(By.linkText("Logout"));
      logoutLink.click();
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 matches for \"$newuser\"")
   public void getUserSearchMatches() {
      WebElement searchResultsHeading=portal.findElement(By.tagName("h2"));
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.