List of usage examples for org.openqa.selenium Keys RETURN
Keys RETURN
To view the source code for org.openqa.selenium Keys RETURN.
Click Source Link
From source file:org.openmrs.module.mirebalais.smoke.pageobjects.forms.ConsultNoteForm.java
License:Open Source License
public void fillFormWithDeath(String primaryDiagnosis) throws Exception { choosePrimaryDiagnosis(primaryDiagnosis); chooseDisposition(DEATH);/* w w w . j a v a 2 s . co m*/ WebElement dateField = driver.findElement(By.cssSelector("#dateOfDeath input[type=text]")); dateField.sendKeys("20 Jun 2014"); dateField.click(); dateField.sendKeys(Keys.RETURN); confirmData(); }
From source file:org.openmrs.module.mirebalais.smoke.pageobjects.forms.EmergencyDepartmentNoteForm.java
License:Open Source License
@Override public void fillFormWithDeath(String primaryDiagnosis) throws Exception { choosePrimaryDiagnosis(primaryDiagnosis); assertThat(submitButtonIsEnabled(), is(false)); chooseDisposition(DEATH);/* ww w. j a va2 s . c o m*/ WebElement dateField = driver.findElement(By.cssSelector("#dateOfDeath input[type=text]")); dateField.click(); dateField.sendKeys("20 Jun 2014"); dateField.sendKeys(Keys.RETURN); assertThat(submitButtonIsEnabled(), is(false)); fillTraumaData(); assertThat(submitButtonIsEnabled(), is(true)); confirmData(); }
From source file:org.richfaces.fragment.inplaceInput.AbstractConfirmOrCancel.java
License:Open Source License
@Override public void confirm() { new Actions(getBrowser()).sendKeys(Keys.chord(Keys.CONTROL, Keys.RETURN)).perform(); waitAfterConfirmOrCancel(); }
From source file:org.richfaces.tests.metamer.ftest.a4jRepeat.MatrixPage.java
License:Open Source License
public void changeValue(int row, int column, int newValue) { WebElement inputElement = getInputRowsElements().get(row).findElements(BY_CELL).get(column) .findElement(BY_INPUT);/*from w w w.j av a2s . c o m*/ inputElement.clear(); Graphene.guardAjax(inputElement).sendKeys(Integer.toString(newValue), Keys.RETURN); getMatrix().get(row).set(column, newValue); }
From source file:org.richfaces.tests.metamer.ftest.richSelect.TestSelect.java
License:Open Source License
@Test @CoversAttributes("selectFirst") @IssueTracking("https://issues.jboss.org/browse/RF-11320") public void testSelectFirst() { selectAttributes.set(SelectAttributes.selectFirst, Boolean.TRUE); select.type("a"); List<WebElement> suggestions = select.advanced().getSuggestionsElements(); assertEquals(suggestions.size(), 4, "Count of filtered options ('a')"); String[] selectOptions = { "Alabama", "Alaska", "Arizona", "Arkansas" }; for (int i = 0; i < selectOptions.length; i++) { assertEquals(suggestions.get(i).getText(), selectOptions[i]); }/* w w w. j a v a2s . c o m*/ assertTrue(suggestions.get(0).getAttribute("class").contains("rf-sel-sel"), "First item should contain class for selected item."); new Actions(driver).sendKeys(Keys.RETURN).perform(); String previousTime = getMetamerPage().getRequestTimeElement().getText(); Utils.triggerJQ(executor, "blur", select.advanced().getInput().advanced().getInputElement()); Graphene.waitModel().until().element(getMetamerPage().getRequestTimeElement()).text().not() .equalTo(previousTime); assertEquals(output.getText(), "Alabama", "Output should be Alabama"); }
From source file:org.richfaces.tests.page.fragments.impl.input.inplaceInput.EditingStateImpl.java
License:Open Source License
private void confirmByKeys() { action.sendKeys(Keys.RETURN).build().perform(); }
From source file:org.richfaces.ui.select.ITSelectKeyboardSelection.java
License:Open Source License
@Test public void test_selection_by_keyboard() { browser.get(contextPath.toExternalForm()); selectInput.sendKeys("t"); waitAjax().until().element(tampaBayOption).is().visible(); keyboard.pressKey(Keys.ARROW_DOWN);/* ww w . ja v a 2s .c om*/ waitAjax().until().element(tampaBayOption).attribute("class").contains("rf-sel-sel"); if (FIREFOX.is(browser)) { keyboard.pressKey(Keys.RETURN); } else { keyboard.pressKey(Keys.ENTER); } waitGui().until().element(selectInput).attribute("value").equalTo("Tampa Bay"); }
From source file:org.senchalabs.gwt.gwtdriver.gxt.models.ComboBoxTest.java
License:Apache License
@Test public void testAutoComplete() throws Exception { //TODO work on these generics ComboBox c = GwtWidget.find(Field.class, driver).withLabel("ComboBox").done().as(ComboBox.class); c.sendKeys("th"); c.waitForDropDown();/*from w w w . j a v a 2 s .c o m*/ c.sendKeys(Keys.RETURN); assert c.getValue().equals("Three") : c.getValue(); }
From source file:org.tomitribe.tribestream.registryng.functionaltests.pages.SearchPage.java
License:Apache License
public void refresh() throws InterruptedException { searchField.sendKeys(Keys.chord(Keys.CONTROL, "a"), Keys.DELETE, Keys.RETURN); Thread.sleep(5000);/*from w w w . j a v a2 s .c o m*/ }
From source file:org.uiautomation.ios.selenium.FormHandlingTest.java
License:Apache License
@Test public void testCanUseReturnKeyToSubmitForm() { driver.get(pages.formPage);//from ww w . j a v a2 s . c o m WebElement element = driver.findElement(By.cssSelector("#nested_form input[type='text']")); final String curURL = driver.getCurrentUrl(); element.sendKeys("something" + Keys.RETURN); new WebDriverWait(driver, 3).until(new ExpectedCondition<Boolean>() { @Override public Boolean apply(WebDriver webDriver) { return !webDriver.getCurrentUrl().equals(curURL); } }); assertTrue(driver.getCurrentUrl().endsWith("something")); }