Example usage for org.openqa.selenium Keys ENTER

List of usage examples for org.openqa.selenium Keys ENTER

Introduction

In this page you can find the example usage for org.openqa.selenium Keys ENTER.

Prototype

Keys ENTER

To view the source code for org.openqa.selenium Keys ENTER.

Click Source Link

Usage

From source file:com.cognifide.qa.bb.actions.SendKeysByOneActionsInterceptorTest.java

License:Apache License

@Test
public void shouldSendThisSameArgumentsWhenSpecialKeyProvided() throws Exception {
    // when/* w w w .  j av  a  2s  . co m*/
    tested.sendKeys(Keys.ENTER + EXAMPLE_TEXT);

    // then
    verify(actions).sendKeys(any(WebElement.class), eq(Keys.ENTER + EXAMPLE_TEXT));
}

From source file:com.cognifide.qa.bb.aem.core.sidepanel.internal.SidePanelImpl.java

License:Apache License

@Override
public Draggable searchForAsset(String asset) {
    if (isClosed()) {
        pageObjectInjector.inject(GlobalBarImpl.class).toggleSidePanel();
    }/*from  w w w . j  av  a2  s .  com*/

    verifyResultsVisible();
    searchInput.clear();
    searchInput.sendKeys(asset);
    searchInput.sendKeys(Keys.ENTER);
    verifyResultsVisible();

    return dragAndDropFactory.createDraggable(getResult(asset), FramePath.parsePath("/"));
}

From source file:com.cognifide.qa.bb.aem.touch.pageobjects.touchui.SidePanel.java

License:Apache License

/**
 * Searches for assets for given asset name and return it as draggable.
 *
 * @param asset name.//from  w ww.  j a  va  2s.  co  m
 * @return {@link Draggable} instance of the asset.
 */
public Draggable searchForAsset(String asset) {
    if (isClosed()) {
        pageObjectInjector.inject(GlobalBar.class).toggleSidePanel();
    }

    verifyResultsVisible();
    searchInput.clear();
    searchInput.sendKeys(asset);
    searchInput.sendKeys(Keys.ENTER);
    verifyResultsVisible();

    return dragAndDropFactory.createDraggable(getResult(asset), FramePath.parsePath("/"));
}

From source file:com.comcast.dawg.house.EditDeviceOverlay.java

License:Apache License

/**
 * Adds a property by inputing the key and then clicking add
 * @param key The key to add// w  w w  . j a  v  a  2s .  c o  m
 * @param set true if the Set check mark should be checked
 * @param byButton true if the property is added by clicking the button, false if it is by pushing enter
 */
public void addProp(String key, boolean set, boolean byButton) {
    WebElement keyInp = overlayUI.findElement(By.className(NEW_PROP_KEY));
    keyInp.sendKeys(key);
    WebElement setCb = overlayUI.findElement(By.className(CB_NEW_PROP_SET));
    if (setCb.isSelected() != set) {
        setCb.click();
    }
    if (byButton) {
        overlayUI.findElement(By.className(BTN_ADD_PROP)).click();
    } else {
        keyInp.click();
        driver.getKeyboard().pressKey(Keys.ENTER);
    }
}

From source file:com.comcast.dawg.house.LoginPageIT.java

License:Apache License

private void loginWithUserName(RemoteWebDriver driver, String user) {
    driver.findElementById(LoginPage.USER_INPUT_ID).click();
    driver.getKeyboard().sendKeys(user);
    driver.getKeyboard().pressKey(Keys.ENTER);
}

From source file:com.digi.selenium.util.common.PageNavigation.java

protected void signInWithMSSIDN(String countryPrefix, String mssidn, String Password) {
    // try{/*from www.  ja v  a  2  s  .c  o m*/
    loadPage(AppConstants.DIGI_LOGIN_PAGE_PROD);
    waitForPageLoad(30);

    WebElement loginElement = getDriver().findElement(By.id("signIn"));
    loginElement.sendKeys(Keys.ENTER);
    waitForPageLoad(60);
    handleLink_ByText(AppConstants.DIGI_LOGIN_WITHPHONENUM);
    handleClearInputField_ByName("cc");
    handleInputField_ByName("cc", countryPrefix);
    handleInputField_ByName("number", mssidn);
    handleInputField_ByName("password", Password);
    handleButtonClick_ByID("inst_button_msisdn-login_form_login");

    /*} catch(Exception e){
       log.error("Fail : "+e.toString());
       throw(e);
    }*/
}

From source file:com.digi.selenium.util.common.PageNavigation.java

protected void signInWithMSSIDN_stage(String countryPrefix, String mssidn, String Password) {
    // try{//  w w w .j a  va 2s  .co m
    loadPage(AppConstants.DIGI_LOGIN_PAGE_STAGE);
    waitForPageLoad(30);

    WebElement loginElement = getDriver().findElement(By.id("signIn"));
    loginElement.sendKeys(Keys.ENTER);
    waitForPageLoad(60);

    handleLink_ByText(AppConstants.DIGI_LOGIN_WITHPHONENUM);
    handleClearInputField_ByName("cc");
    handleInputField_ByName("cc", countryPrefix);
    handleInputField_ByName("number", mssidn);
    handleInputField_ByName("password", Password);
    handleButtonClick_ByID("inst_button_msisdn-login_form_login");
    /*} catch(Exception e){
       log.error("Fail : "+e.toString());
       throw(e);
    }*/
}

From source file:com.digi.selenium.util.PageNavigation.java

protected void signInWithMSSIDN_stage(String countryPrefix, String mssidn, String Password) {
    try {//  ww w  .  j a  v  a2  s. c  o m
        loadPage(AppConstants.DIGI_LOGIN_PAGE_STAGE);
        waitForPageLoad(30);
        WebElement loginElement = getDriver().findElement(By.id("signIn"));
        loginElement.sendKeys(Keys.ENTER);
        waitForPageLoad(60);
        handleLink_ByText(AppConstants.DIGI_LOGIN_WITHPHONENUM);
        handleClearInputField_ByName("cc");
        handleInputField_ByName("cc", countryPrefix);
        handleInputField_ByName("number", mssidn);
        handleInputField_ByName("password", Password);
        handleButtonClick_ByID("inst_button_msisdn-login_form_login");
    } catch (Exception e) {
        log.error("Fail : Login Failur for MSSIDN  :" + mssidn);
        shutDown();
    }
}

From source file:com.easytox.automation.steps.AuditAndUserLogImpl.java

@When("^Select a value from 'Lab Client' drop down and click Search$")
public void select_value_from_lab_client_drop_down() {
    clear_filer();//  w w w.  j  av a2s  . c om
    MyWebDriverUtils.selectOption(driver, LAB_CLIENT_DROP_DOWN_LOCATOR, LocatorType.ID, "SLabClientOne");

    driver.findElement(By.id(SEARCH_BUTTON_LOCATOR)).sendKeys(Keys.ENTER);

}

From source file:com.easytox.automation.steps.AuditAndUserLogImpl.java

@When("^Select a value from 'User' drop down and click Search$")
public void select_a_value_from_user_drop_down() {
    clear_filer();/*  w  w  w .  ja va  2s  .  c om*/
    MyWebDriverUtils.selectOption(driver, USER_DROP_DOWN_LOCATOR, LocatorType.ID, "SNlabadmin");

    driver.findElement(By.id(SEARCH_BUTTON_LOCATOR)).sendKeys(Keys.ENTER);
}