Example usage for org.openqa.selenium Keys END

List of usage examples for org.openqa.selenium Keys END

Introduction

In this page you can find the example usage for org.openqa.selenium Keys END.

Prototype

Keys END

To view the source code for org.openqa.selenium Keys END.

Click Source Link

Usage

From source file:org.eclipse.che.selenium.preferences.CheckErrorsWarningsTabTest.java

License:Open Source License

private void changeAllSettingsInErrorsWarningsTab(
        Preferences.DropDownValueForErrorWaitingWidget valueOfRadioButton) {
    preferences.waitPreferencesForm();//from w  w  w  . j ava 2  s.  com
    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.che.selenium.projectexplorer.dependencies.UpdateListOfLibraryTest.java

License:Open Source License

private void addNewDependency() {
    editor.waitActiveEditor();//ww  w.j ava 2 s.c  o m
    loader.waitOnClosed();
    editor.setCursorToLine(43);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ENTER.toString());

    editor.typeTextIntoEditorWithoutDelayForSaving("<dependency>");
    editor.typeTextIntoEditorWithoutDelayForSaving("\n");
    editor.setCursorToLine(45);

    editor.typeTextIntoEditorWithoutDelayForSaving("<groupId>");
    editor.typeTextIntoEditorWithoutDelayForSaving("com.fasterxml.jackson.core");
    editor.typeTextIntoEditorWithoutDelayForSaving("</groupId>");
    editor.typeTextIntoEditorWithoutDelayForSaving("\n");
    editor.setCursorToLine(46);

    editor.typeTextIntoEditorWithoutDelayForSaving("<artifactId>");
    editor.typeTextIntoEditorWithoutDelayForSaving("jackson-core");
    editor.typeTextIntoEditorWithoutDelayForSaving("</artifactId>");
    editor.typeTextIntoEditorWithoutDelayForSaving("\n");
    editor.setCursorToLine(47);

    editor.typeTextIntoEditorWithoutDelayForSaving("<version>");
    editor.typeTextIntoEditorWithoutDelayForSaving("2.4.3");
    editor.typeTextIntoEditorWithoutDelayForSaving("</version>");
    editor.typeTextIntoEditorWithoutDelayForSaving("\n");

    editor.typeTextIntoEditorWithoutDelayForSaving("</dependency>");
    editor.typeTextIntoEditor(Keys.SPACE.toString());
}

From source file:org.eclipse.che.selenium.refactor.fields.FailNotPrivateFieldTest.java

License:Open Source License

@Test
public void testFail0() throws Exception {
    setFieldsForTest("testfail0");
    projectExplorer.scrollToItemByPath(PROJECT_NAME + "/src/main/webapp");
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();//from   w w  w . ja  v  a2  s . c  o  m
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(13);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    refactor.waitUpdateReferencesIsSelected();
    refactor.typeAndWaitNewName("g");
    refactor.waitTextInErrorMessage("A field with this name is already defined.");
    refactor.clickCancelButtonRefactorForm();
    refactor.waitRenameFieldFormIsClosed();
    editor.closeFileByNameWithSaving("A");
}

From source file:org.eclipse.che.selenium.refactor.fields.FailNotPrivateFieldTest.java

License:Open Source License

@Test(priority = 1)
public void testFail3() throws Exception {
    setFieldsForTest("testfail3");
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();/*  ww  w  . j  av a 2 s  .co  m*/
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(13);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    refactor.waitUpdateReferencesIsSelected();
    refactor.typeAndWaitNewName("g");
    refactor.waitTextInErrorMessage("A field with this name is already defined.");
    refactor.clickCancelButtonRefactorForm();
    refactor.waitRenameFieldFormIsClosed();
    editor.closeFileByNameWithSaving("A");
}

From source file:org.eclipse.che.selenium.refactor.fields.FailNotPrivateFieldTest.java

License:Open Source License

@Test(priority = 2)
public void testFail7() throws Exception {
    setFieldsForTest("testfail7");
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();//from w  ww . j a va 2 s .c o m
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(13);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    refactor.waitUpdateReferencesIsSelected();
    refactor.typeAndWaitNewName("g");
    refactor.clickOkButtonRefactorForm();
    askDialog.acceptDialogWithText(
            "Problem in 'A.java'. Another name will shadow access to the renamed element");
    refactor.waitRenameFieldFormIsClosed();
    editor.closeFileByNameWithSaving("A");
}

From source file:org.eclipse.che.selenium.refactor.fields.FailNotPrivateFieldTest.java

License:Open Source License

@Test(priority = 3)
public void testFail10() throws Exception {
    setFieldsForTest("testfail10");
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();/*from  w  w  w.j  a va  2  s.com*/
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(13);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    refactor.waitUpdateReferencesIsSelected();
    refactor.typeAndWaitNewName("g");
    refactor.clickOkButtonRefactorForm();
    askDialog.acceptDialogWithText(
            "Problem in 'A.java'. Another name will shadow access to the renamed element");
    refactor.waitRenameFieldFormIsClosed();
    editor.closeFileByNameWithSaving("A");
}

From source file:org.eclipse.che.selenium.refactor.fields.FailNotPrivateFieldTest.java

License:Open Source License

@Test(priority = 4)
public void testFail14() throws Exception {
    setFieldsForTest("testfail14");
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();/*  w w w .  j  a v  a2 s  .c om*/
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(13);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    refactor.waitUpdateReferencesIsSelected();
    refactor.typeAndWaitNewName("g");
    refactor.clickOkButtonRefactorForm();
    askDialog.acceptDialogWithText(
            "Problem in 'A.java'. Another name will shadow access to the renamed element");
    refactor.waitRenameFieldFormIsClosed();
    editor.closeFileByNameWithSaving("A");
}

From source file:org.eclipse.che.selenium.refactor.fields.FailPrivateFieldTest.java

License:Open Source License

@Test
public void testFail0() throws Exception {
    setFieldsForTest("testfail0");
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();/* w w w  . j  a  va  2s.c  om*/
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(13);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    refactor.waitUpdateReferencesIsSelected();
    refactor.typeAndWaitNewName("g");
    refactor.waitTextInErrorMessage("A field with this name is already defined.");
    refactor.clickCancelButtonRefactorForm();
    refactor.waitRenameFieldFormIsClosed();
    editor.closeFileByNameWithSaving("A");
}

From source file:org.eclipse.che.selenium.refactor.fields.FailPrivateFieldTest.java

License:Open Source License

@Test(priority = 1)
public void testFail4() throws Exception {
    setFieldsForTest("testfail4");
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();/*from www  .  j a  v  a  2  s  .co  m*/
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(13);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    refactor.waitUpdateReferencesIsSelected();
    refactor.typeAndWaitNewName("g");
    refactor.waitTextInErrorMessage("A field with this name is already defined.");
    refactor.clickCancelButtonRefactorForm();
    refactor.waitRenameFieldFormIsClosed();
    editor.closeFileByNameWithSaving("A");
}

From source file:org.eclipse.che.selenium.refactor.fields.FailPrivateFieldTest.java

License:Open Source License

@Test(priority = 2)
public void testFail6() throws Exception {
    setFieldsForTest("testfail6");
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();//from  w w w.  j a v  a2 s  .c  o m
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(13);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    refactor.waitUpdateReferencesIsSelected();
    refactor.typeAndWaitNewName("g");
    refactor.clickOkButtonRefactorForm();
    askDialog.acceptDialogWithText("After renaming, the field 'f' will be hidden"
            + " in the scope of the field 'g' declared in type 'testfail6.A.B'");
    refactor.waitRenameFieldFormIsClosed();
    editor.closeFileByNameWithSaving("A");
}