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.easytox.automation.steps.AuditAndUserLogImpl.java

@When("^Select From and To Dates in the Date Range and click Search$")
public void select_from_and_to_dates_in_the_date_range() {
    clear_filer();//www .  j  a va  2 s  .com

    MyWebDriverUtils.enterData(driver, DATE_FROM_LOCATOR, LocatorType.ID,
            Date.FROM_MONTH + "/" + Date.FROM_DAY + "/" + Date.FROM_YEAR);
    MyWebDriverUtils.enterData(driver, DATE_TO_LOCATOR, LocatorType.ID,
            Date.TO_MONTH + "/" + Date.TO_DAY + "/" + Date.TO_YEAR);

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

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

@When("^Enter a value 'Table Name' field and click Search$")
public void enter_value_table_name_field() {
    clear_filer();/*  ww w.jav  a  2s .  c  om*/
    MyWebDriverUtils.enterData(driver, TABLE_NAME_LOCATOR, LocatorType.ID, TABLE_NAME_VALUE);

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

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

@When("^Select an Event Type from the drop down and click Search$")
public void select_event_type_from_drop_down() {
    clear_filer();//  ww  w. j  av  a  2  s. co  m
    MyWebDriverUtils.selectOption(driver, EVENT_TYPE_LOCATOR, LocatorType.ID, EVENT_TYPE_OPTION);

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

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

@When("^Select values from two or more filters and click Search$")
public void select_a_few_filters() {
    clear_filer();//from ww  w .ja v  a 2s.  c o  m
    MyWebDriverUtils.enterData(driver, TABLE_NAME_LOCATOR, LocatorType.ID, TABLE_NAME_VALUE);
    MyWebDriverUtils.selectOption(driver, EVENT_TYPE_LOCATOR, LocatorType.ID, EVENT_TYPE_OPTION);
    MyWebDriverUtils.selectOption(driver, USER_DROP_DOWN_LOCATOR, LocatorType.ID, "SNlabadmin");

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

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

private void clear_filer() {
    MyWebDriverUtils.selectOption(driver, LAB_CLIENT_DROP_DOWN_LOCATOR, LocatorType.ID, "Select Lab Client");
    MyWebDriverUtils.selectOption(driver, USER_DROP_DOWN_LOCATOR, LocatorType.ID, "Select User");
    MyWebDriverUtils.selectOption(driver, EVENT_TYPE_LOCATOR, LocatorType.ID, "Event Type");
    MyWebDriverUtils.enterData(driver, TABLE_NAME_LOCATOR, LocatorType.ID, "");
    MyWebDriverUtils.enterData(driver, DATE_FROM_LOCATOR, LocatorType.ID, "");
    MyWebDriverUtils.enterData(driver, DATE_TO_LOCATOR, LocatorType.ID, "");

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

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

@When("^Select a value from 'Lab Client' drop down and click Search.$")
public void select_lab_client_drop_down_and_click_search() {
    clear_user_log_filter();//from   ww w  .  jav a  2  s  .  co m
    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_user_drop_down_and_click_search() {
    clear_user_log_filter();/* www . j a v a  2 s  .com*/
    MyWebDriverUtils.selectOption(driver, USER_DROP_DOWN_LOCATOR, LocatorType.ID, "SNlabadmin");

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

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

@When("^Select From and To Dates in the Date Range and click Search.$")
public void select_from_and_to_dates__and_click_search() {
    clear_user_log_filter();/* www. j  av a2s.c om*/

    MyWebDriverUtils.enterData(driver, DATE_FROM_LOCATOR, LocatorType.ID,
            Date.FROM_MONTH + "/" + Date.FROM_DAY + "/" + Date.FROM_YEAR);
    MyWebDriverUtils.enterData(driver, DATE_TO_LOCATOR, LocatorType.ID,
            Date.TO_MONTH + "/" + Date.TO_DAY + "/" + Date.TO_YEAR);

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

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

@When("^Select values from two or more filters and click Search.$")
public void select_two_or_more_filters_and_click_search() {
    clear_user_log_filter();/*  ww  w .  j  a  v  a2s.c  om*/
    MyWebDriverUtils.selectOption(driver, USER_DROP_DOWN_LOCATOR, LocatorType.ID, "SNlabadmin");

    MyWebDriverUtils.enterData(driver, DATE_FROM_LOCATOR, LocatorType.ID,
            Date.FROM_MONTH + "/" + Date.FROM_DAY + "/" + Date.FROM_YEAR);
    MyWebDriverUtils.enterData(driver, DATE_TO_LOCATOR, LocatorType.ID,
            Date.TO_MONTH + "/" + Date.TO_DAY + "/" + Date.TO_YEAR);

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

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

@When("^In User log click on down arrow icon  on (.*)$")
public void in_user_log_click_on_down_arrow_icon(String column) {
    if (column.equals("User Name")) {
        MyWebDriverUtils.waitContainerThenClick(driver, SORT_ASCENDING_LOCATOR, LocatorType.CSS);
    }//from ww w  .  j a v a  2s .  c  o m
    String locator = getLocator(column);

    if (column.equals("Case Acc#") && locator != null) {
        driver.findElement(By.cssSelector(locator)).sendKeys(Keys.ENTER);
    } else {
        MyWebDriverUtils.waitContainerThenClick(driver, locator, LocatorType.CSS);
    }
}