List of usage examples for org.openqa.selenium Keys ENTER
Keys ENTER
To view the source code for org.openqa.selenium Keys ENTER.
Click Source Link
From source file:com.easytox.automation.steps.AuditAndUserLogImpl.java
@When("^In User Log click on up arrow icon on (.*)$") public void in_user_log_click_on_up_arrow_icon(String column) { if (column.equals("Case Acc#")) { driver.findElement(By.cssSelector(SORT_ASCENDING_LOCATOR)).sendKeys(Keys.ENTER); } else {/*from w w w .jav a2 s . c om*/ MyWebDriverUtils.waitContainerThenClick(driver, SORT_ASCENDING_LOCATOR, LocatorType.CSS); } }
From source file:com.elastica.webelements.ButtonElement.java
License:Apache License
@Override public void click() { captureSnapshot("Before clicking"); TestLogging.logWebStep(null, "click on " + toHTML(), false); BrowserType browser = WebUIDriver.getWebUXDriver().getConfig().getBrowser(); if (browser == BrowserType.InternetExplore) { super.sendKeys(Keys.ENTER); // not stable on IE9 super.handleLeaveAlert(); } else {/*from ww w .j ava 2 s . c om*/ super.click(); } }
From source file:com.elastica.webelements.HtmlElement.java
License:Apache License
public void click() { findElement();//from w ww.j av a2s . c o m BrowserType browser = WebUIDriver.getWebUXDriver().getConfig().getBrowser(); if (browser != BrowserType.Opera) { try { element.click(); } catch (org.openqa.selenium.TimeoutException ex) { TestLogging.log("Get timeout customexception, ignore"); } } else { // Ignore no response on ECMAScript evaluation command for Opera try { element.sendKeys(Keys.ENTER); WaitHelper.waitForSeconds(2); } catch (WebDriverException e) { } } // IE is "too fast" if (browser == BrowserType.InternetExplore) { WaitHelper.waitForSeconds(2); } // Handle Confirm Navigation pop up for Chrome and IE handleLeaveAlert(); }
From source file:com.ggasoftware.uitest.control.Input.java
License:Open Source License
/** * Use this method to simulate enter key press into an element. * * @return Parent instance/*from w w w . ja v a2 s.c o m*/ */ public ParentPanel pressEnter() { return super.sendKeys(Keys.ENTER); }
From source file:com.github.fscheffer.arras.demo.DataTableIT.java
License:Apache License
@Test public void testSearch() { text(FILTER, "ghost"); assertRowCount(2, "Showing 1 to 2 of 2 entries (filtered from 1,722 total entries)"); assertRow(0, "Born as Ghosts", "The Battle of Los Angeles", "Rage Against The Machine", "Alternative Metal", "0", "0"); assertRow(1, "Warboys", "Stolar Tracks Vol. 2", "Ghost Of An American Airman", "Alternative & Punk", "3", "0"); // workaround: clearing the field is not enough. have to send a key text(FILTER, String.valueOf(Keys.ENTER)); assertRowCount(25, paginationInfo(1, 25)); assertRow(0, "(untitled hidden track)", "Fear Of Fours", "Lamb", "Downtempo", "2", "0"); // try a filter with paging text(FILTER, "Electronic"); assertRowCount(25, "Showing 1 to 25 of 654 entries (filtered from 1,722 total entries)"); assertRow(0, "04 04 04 04 04 Cowgirl (Irish Pub In Ky", "Dirty Epic - Cowgirl (EP)", "Underworld", "Electronica", "4", "0"); click(pagination(1));//from ww w . ja v a 2s.c o m assertRowCount(25, "Showing 26 to 50 of 654 entries (filtered from 1,722 total entries)"); assertRow(0, "Air Batucada", "The Mirror Conspiracy", "Thievery Corporation", "Electronic", "3", "0"); // no results text(FILTER, "foobar"); assertRowCount(1, "Showing 0 to 0 of 0 entries (filtered from 1,722 total entries)"); assertRow(0, "No matching records found"); }
From source file:com.github.wiselenium.page.AjaxElementPage.java
License:Open Source License
public AjaxElementPage search(CharSequence... keysToSend) { this.text.sendKeys(keysToSend); this.text.sendKeys(Keys.ENTER); return this; }
From source file:com.googlesites.MapsPage.java
public void search(String location) { driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS); driver.findElement(By.cssSelector(SEARCH_BOX)).sendKeys(location); driver.findElement(By.cssSelector(SEARCH_BOX)).sendKeys(Keys.ENTER); driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); }
From source file:com.hotwire.selenium.bex.BexAbstractPage.java
License:Open Source License
protected void setTextAndSubmit(String cssSelector, String inputText) { WebElement element = getWebDriver().findElement(By.cssSelector(cssSelector)); element.clear();//from w w w . j ava 2 s .c om element.sendKeys(inputText); element.sendKeys(Keys.ENTER); }
From source file:com.hotwire.selenium.tools.c3.customer.C3SearchCustomerPage.java
License:Open Source License
public void setConfirmationNumber(String itin) { WebElement itineraryInput = findOne("input#confirmationNumber", EXTRA_WAIT); itineraryInput.sendKeys(itin);//from ww w. j av a2s .co m waitForRedArrow(); itineraryInput.sendKeys(Keys.ENTER); }
From source file:com.hotwire.selenium.tools.c3.customer.C3SearchCustomerPage.java
License:Open Source License
private void searchCustomerBy(String cssLocator, String searchValue) { WebElement itineraryInput = findOne(cssLocator, EXTRA_WAIT); itineraryInput.sendKeys(searchValue); waitForRedArrow();// www. jav a 2 s . co m itineraryInput.sendKeys(Keys.ENTER); }