List of usage examples for org.openqa.selenium Keys DELETE
Keys DELETE
To view the source code for org.openqa.selenium Keys DELETE.
Click Source Link
From source file:objective.taskboard.it.MainPage.java
License:Open Source License
public MainPage clearSearch() { searchIssuesInput.sendKeys(Keys.CONTROL, "a"); searchIssuesInput.sendKeys(Keys.DELETE); waitUntil(textToBePresentInElementValue(searchIssuesInput, "")); return this; }
From source file:org.callimachusproject.webdriver.pages.TextEditor.java
License:Apache License
private TextEditor end() { browser.focusInFrame(topFrameName, "editor-iframe"); // shift/control does not appear to work in IE CharSequence[] keys = new CharSequence[1024]; for (int i = 0; i < keys.length; i++) { keys[i] = Keys.DELETE; }// w w w . j a v a 2 s . c om browser.sendKeys(By.tagName("textarea"), keys); return this; }
From source file:org.eclipse.che.selenium.debugger.BreakpointReorderingTest.java
License:Open Source License
@Test public void shouldNotRemoveBreakpointWhenFirstCharacterRemoved() throws Exception { editor.goToCursorPositionVisible(26, 1); actionsFactory.createAction(seleniumWebDriver).sendKeys(Keys.DELETE).build().perform(); editor.waitInactiveBreakpoint(26);// w ww.j av a 2s . c o m }
From source file:org.eclipse.che.selenium.editor.autocomplete.AutocompleteWithInheritTest.java
License:Open Source License
@Test public void updateDependencyWithInheritTest() { projectExplorer.waitProjectExplorer(); //projectExplorer.waitItem(PROJECT_NAME); mavenPluginStatusBar.waitClosingInfoPanel(); projectExplorer.quickExpandWithJavaScript(); projectExplorer.openItemByVisibleNameInExplorer("AppController.java"); editor.waitAllMarkersDisappear(ERROR_MARKER); projectExplorer.openItemByVisibleNameInExplorer(EXTENDED_CLASS + ".java"); editor.returnFocusInCurrentLine();/*from www . j a va2 s.co m*/ editor.waitMarkerInPosition(ERROR_MARKER, 13); editor.setCursorToLine(13); editor.launchPropositionAssistPanel(); editor.waitTextIntoFixErrorProposition("Add constructor 'InheritClass(int,String)'"); editor.selectFirstItemIntoFixErrorPropByEnter(); editor.waitTextIntoEditor(contentAfterFix); editor.waitMarkerDisappears(ERROR_MARKER, 13); editor.waitMarkerInPosition(TASK_MARKER_OVERVIEW, 18); editor.waitTabFileWithSavedStatus(EXTENDED_CLASS); editor.selectTabByName(BASE_CLASS); loader.waitOnClosed(); editor.selectLineAndDelete(24); editor.typeTextIntoEditor("int testString;"); editor.typeTextIntoEditor(Keys.ARROW_DOWN.toString()); editor.typeTextIntoEditor(Keys.ARROW_DOWN.toString()); editor.selectLineAndDelete(); editor.typeTextIntoEditor("public AppController(int testInt, int testString) {"); editor.typeTextIntoEditor(Keys.DELETE.toString()); editor.waitTabFileWithSavedStatus(BASE_CLASS); editor.selectTabByName(EXTENDED_CLASS); loader.waitOnClosed(); editor.setCursorToLine(16); editor.typeTextIntoEditor(Keys.END.toString()); editor.typeTextIntoEditor(Keys.HOME.toString()); editor.typeTextIntoEditor(Keys.DELETE.toString()); editor.typeTextIntoEditor("s"); editor.launchPropositionAssistPanel(); editor.waitTextIntoFixErrorProposition("Change type of 'testString' to 'int'"); editor.selectFirstItemIntoFixErrorPropByDoubleClick(); editor.waitAllMarkersDisappear(ERROR_MARKER); }
From source file:org.eclipse.che.selenium.mavenplugin.CheckMavenPluginTest.java
License:Open Source License
@Test(priority = 3) public void excludeIncludeModules() { projectExplorer.clickCollapseAllButton(); projectExplorer.expandPathInProjectExplorerAndOpenFile(PROJECT_NAME, "pom.xml"); editor.waitActiveEditor();/* w w w . ja v a 2 s . co m*/ editor.setCursorToDefinedLineAndChar(13, 8); editor.typeTextIntoEditor("!--"); editor.setCursorToDefinedLineAndChar(13, 32); editor.typeTextIntoEditor("--"); projectExplorer.waitFolderDefinedTypeOfFolderByPath(PROJECT_NAME + "/my-lib", ProjectExplorer.FolderTypes.SIMPLE_FOLDER); editor.setCursorToDefinedLineAndChar(13, 32); editor.typeTextIntoEditor(Keys.DELETE.toString()); editor.typeTextIntoEditor(Keys.DELETE.toString()); editor.setCursorToDefinedLineAndChar(13, 8); editor.typeTextIntoEditor(Keys.DELETE.toString()); editor.typeTextIntoEditor(Keys.DELETE.toString()); editor.typeTextIntoEditor(Keys.DELETE.toString()); projectExplorer.waitFolderDefinedTypeOfFolderByPath(PROJECT_NAME + "/my-lib", ProjectExplorer.FolderTypes.PROJECT_FOLDER); editor.closeAllTabs(); }
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 www .ja v a 2 s . c o m "" + 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
@Test(priority = 14) public void checkDeleteAction() throws InterruptedException { // if the bug exists -> the dialog appears and the terminal lose focus terminal.typeIntoTerminal(Keys.DELETE.toString()); terminal.typeIntoTerminal("pwd"); }
From source file:org.eclipse.che.selenium.pageobject.theia.TheiaTerminal.java
License:Open Source License
public String getTerminalOutput(int terminalIndex) { // TODO this is workaround and should be resolved by issue: // https://github.com/eclipse/che/issues/11387 final String expectedTextFileName = "Untitled.txt"; String terminalOutput = ""; copyTerminalTextToClipboard(terminalIndex); // create text file theiaProjectTree.clickOnProjectsRootItem(); theiaProjectTree.waitProjectsRootItemSelected(); theiaIde.runMenuCommand("File", "New File"); theiaNewFileDialog.waitDialog();/*from www.j a v a2s .co m*/ theiaNewFileDialog.waitNewFileNameValue(expectedTextFileName); theiaNewFileDialog.clickOkButton(); theiaNewFileDialog.waitDialogClosed(); // check text file availability theiaEditor.waitEditorTab(expectedTextFileName); theiaEditor.waitTabSelecting(expectedTextFileName); theiaEditor.waitActiveEditor(); theiaEditor.performPasteAction(); terminalOutput = theiaEditor.getEditorTextAsString(); // delete text file theiaProjectTree.clickOnItem(expectedTextFileName); theiaProjectTree.waitItemSelected(expectedTextFileName); seleniumWebDriverHelper.sendKeys(Keys.DELETE.toString()); theiaDeleteFileDialog.waitDialog(); theiaDeleteFileDialog.clickOkButton(); theiaDeleteFileDialog.waitDialogDesapearance(); theiaProjectTree.waitItemDisappearance(expectedTextFileName); theiaEditor.waitEditorTabDesapearance(expectedTextFileName); return terminalOutput; }
From source file:org.eclipse.che.selenium.preferences.CheckErrorsWarningsTabTest.java
License:Open Source License
private void changeAllSettingsInErrorsWarningsTab( Preferences.DropDownValueForErrorWaitingWidget valueOfRadioButton) { preferences.waitPreferencesForm();/* w w w . j a va2 s . co m*/ preferences.waitMenuInCollapsedDropdown(Preferences.DropDownJavaCompilerMenu.ERRORS_WARNINGS); preferences.selectDroppedMenuByName(Preferences.DropDownJavaCompilerMenu.ERRORS_WARNINGS); preferences.setAllSettingsInErrorWaitingWidget(valueOfRadioButton); preferences.clickOnOkBtn(); preferences.clickOnCloseBtn(); loader.waitOnClosed(); projectExplorer.waitItem(PATH_TO_CLASS_IN_SPRING_PACKAGE); projectExplorer.openItemByPath(PATH_TO_CLASS_IN_SPRING_PACKAGE); loader.waitOnClosed(); editor.setCursorToLine(84); editor.typeTextIntoEditor(Keys.END.toString()); editor.typeTextIntoEditor(Keys.ENTER.toString()); editor.typeTextIntoEditorWithoutDelayForSaving(Keys.ARROW_LEFT.toString()); editor.typeTextIntoEditorWithoutDelayForSaving(Keys.ENTER.toString()); editor.typeTextIntoEditor(Keys.DELETE.toString()); editor.typeTextIntoEditor(Keys.DELETE.toString()); WaitUtils.sleepQuietly(3); }
From source file:org.eclipse.scout.rt.testing.ui.rap.RapMock.java
License:Open Source License
protected Keys toSeleniumKey(Key key) { switch (key) { case Shift:/*from ww w. j a v a 2 s . com*/ return Keys.SHIFT; case Control: return Keys.CONTROL; case Alt: return Keys.ALT; case Delete: return Keys.DELETE; case Backspace: return Keys.BACK_SPACE; case Enter: return Keys.ENTER; case Esc: return Keys.ESCAPE; case Tab: return Keys.TAB; case ContextMenu: throw new IllegalArgumentException("Unknown keyboard key: " + key); case Up: return Keys.UP; case Down: return Keys.DOWN; case Left: return Keys.LEFT; case Right: return Keys.RIGHT; case Windows: return Keys.META; case F1: return Keys.F1; case F2: return Keys.F2; case F3: return Keys.F3; case F4: return Keys.F4; case F5: return Keys.F5; case F6: return Keys.F6; case F7: return Keys.F7; case F8: return Keys.F8; case F9: return Keys.F9; case F10: return Keys.F10; case F11: return Keys.F11; case F12: return Keys.F12; case Home: return Keys.HOME; case End: return Keys.END; case PageUp: return Keys.PAGE_UP; case PageDown: return Keys.PAGE_DOWN; case NumPad0: return Keys.NUMPAD0; case NumPad1: return Keys.NUMPAD1; case NumPad2: return Keys.NUMPAD2; case NumPad3: return Keys.NUMPAD3; case NumPad4: return Keys.NUMPAD4; case NumPad5: return Keys.NUMPAD5; case NumPad6: return Keys.NUMPAD6; case NumPad7: return Keys.NUMPAD7; case NumPad8: return Keys.NUMPAD8; case NumPadMultiply: return Keys.MULTIPLY; case NumPadDivide: return Keys.DIVIDE; case NumPadAdd: return Keys.ADD; case NumPadSubtract: return Keys.SUBTRACT; case NumPadDecimal: return Keys.DECIMAL; case NumPadSeparator: return Keys.SEPARATOR; default: throw new IllegalArgumentException("Unknown keyboard key: " + key); } }