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:org.eclipse.che.selenium.miscellaneous.WorkingWithTerminalTest.java
License:Open Source License
@Test(priority = 8) public void shouldBeReset() { terminal.typeIntoTerminal("cd / && ls -l" + Keys.ENTER); //clear terminal terminal.typeIntoTerminal("reset" + Keys.ENTER.toString()); terminal.waitExpectedTextNotPresentTerminal("reset"); terminal.waitTerminalIsNotEmpty();// w w w . jav a2 s . co m String terminalContent = terminal.getVisibleTextFromTerminal().trim(); assertTrue(terminalContent.matches("^(user@)[a-z0-9]{12}(:/\\$)$")); }
From source file:org.eclipse.che.selenium.miscellaneous.WorkingWithTerminalTest.java
License:Open Source License
@Test(priority = 9) public void shouldTurnToNormalModeFromAlternativeScreenModeAndOtherwise() { // open MC - terminal will switch off from normal mode to alternative screen with text user interface (pseudo user graphics). openMC("/");/*from w ww . j a va 2 s. c om*/ // turn back to "normal" mode terminal.typeIntoTerminal(Keys.CONTROL + "o"); for (String partOfContent : CHECK_MC_OPENING) { terminal.waitExpectedTextNotPresentTerminal(partOfContent); } terminal.typeIntoTerminal(Keys.CONTROL + "o" + Keys.ENTER); for (String partOfContent : CHECK_MC_OPENING) { terminal.waitExpectedTextIntoTerminal(partOfContent); } }
From source file:org.eclipse.che.selenium.miscellaneous.WorkingWithTerminalTest.java
License:Open Source License
@Test(priority = 11) public void shouldViewFolderIntoMC() { openMC("/");/*w w w. j av a2 s . c o m*/ //select bin folder and view this folder by "F3" key terminal.waitExpectedTextIntoTerminal("/bin"); terminal.typeIntoTerminal(Keys.HOME.toString() + Keys.F3.toString()); for (String partOfContent : VIEW_BIN_FOLDER) { terminal.waitExpectedTextIntoTerminal(partOfContent); } terminal.typeIntoTerminal("cd ~" + Keys.ENTER); terminal.waitExpectedTextIntoTerminal(".cache"); }
From source file:org.eclipse.che.selenium.miscellaneous.WorkingWithTerminalTest.java
License:Open Source License
@Test(priority = 12) public void closeTerminalByExitCommand() { terminal.typeIntoTerminal("exit" + Keys.ENTER); terminal.waitTerminalIsNotPresent(1); }
From source file:org.eclipse.che.selenium.miscellaneous.WorkingWithTerminalTest.java
License:Open Source License
@Test(priority = 13) public void shouldEditFileIntoMCEdit() { openMC("/projects/" + PROJECT_NAME); //check End, Home, F4, Delete keys terminal.typeIntoTerminal("" + Keys.END + Keys.ENTER + Keys.END + Keys.ARROW_UP + Keys.F4); //select editor terminal.typeIntoTerminal(valueOf(1) + Keys.ENTER); terminal.waitExpectedTextIntoTerminal( "README.md " + "[----] 0 L:[ 1+ 0 1/ 1] *(0 / 21b) 0035 0x023"); terminal.typeIntoTerminal("<!-some comment->"); terminal.typeIntoTerminal(/*from w w w . ja v a2 s .c om*/ "" + Keys.HOME + Keys.ARROW_RIGHT + Keys.ARROW_RIGHT + Keys.ARROW_RIGHT + Keys.DELETE); terminal.waitExpectedTextIntoTerminal("<!-ome comment->"); }
From source file:org.eclipse.che.selenium.miscellaneous.WorkingWithTerminalTest.java
License:Open Source License
private void openMC(String currentLocation) { // launch mc from root directory loader.waitOnClosed();/*from ww w . j a v a2 s . c o m*/ consoles.selectProcessByTabName("Terminal"); terminal.typeIntoTerminal("cd " + currentLocation); terminal.typeIntoTerminal(Keys.ENTER.toString()); terminal.typeIntoTerminal("mc"); terminal.typeIntoTerminal(Keys.ENTER.toString()); terminal.waitTerminalIsNotEmpty(); }
From source file:org.eclipse.che.selenium.pageobject.CheTerminal.java
License:Open Source License
/** * Types and executes given command in terminal. * * @param command text to run in terminal *//* w w w . j a v a 2s .c o m*/ public void sendCommandIntoTerminal(String command) { selectFocusToActiveTerminal(); defaultTerminalContainer.findElement(By.tagName("textarea")).sendKeys(command + Keys.ENTER.toString()); loader.waitOnClosed(); }
From source file:org.eclipse.che.selenium.pageobject.CodenvyEditor.java
License:Open Source License
/** * wait renaming field in the Editor (usually it field is used by language servers), type new * value and wait closing of the field//from w ww . j a v a 2 s . c o m * * @param renameValue */ public void doRenamingByLanguageServerField(String renameValue) { seleniumWebDriverHelper.setValue(languageServerRenameField, renameValue); seleniumWebDriverHelper.waitAndSendKeysTo(languageServerRenameField, Keys.ENTER.toString()); }
From source file:org.eclipse.che.selenium.pageobject.git.GitPanel.java
License:Open Source License
public void openDiffForChangedFileWithEnterKey(String filename) { waitFileInChangesList(filename);/*from w w w . j a v a 2 s .c om*/ seleniumWebDriver.findElement(By.xpath(String.format(Locators.CHANGED_FILE_BY_NAME, filename))).click(); seleniumWebDriver.getKeyboard().sendKeys(Keys.ENTER); }
From source file:org.eclipse.che.selenium.pageobject.GoogleLogin.java
License:Open Source License
public void typeLogin(String login) { new WebDriverWait(seleniumWebDriver, 10).until(ExpectedConditions.visibilityOf(emailInput)).sendKeys(login); emailInput.sendKeys(Keys.ENTER.toString()); }