Example usage for org.openqa.selenium Keys ENTER

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

Introduction

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

Prototype

Keys ENTER

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

Click Source Link

Usage

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

License:Open Source License

@Test(priority = 13)
public void checkBugFiveEightTwoOne26() throws Exception {
    setFieldsForTest("test26");
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();// w  w w .j av  a2  s  .  c  om
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToDefinedLineAndChar(13, 17);
    editor.launchRefactorFormFromEditor();
    editor.typeTextIntoEditor("test1");
    loader.waitOnClosed();
    editor.typeTextIntoEditor(Keys.ENTER.toString());
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 14)
public void checkRenameDelegate28() throws Exception {
    setFieldsForTest("test28");
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();//  w w w  .  j ava 2  s  .c  o m
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(15);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.typeTextIntoEditor("g");
    loader.waitOnClosed();
    editor.typeTextIntoEditor(Keys.ENTER.toString());
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 15)
public void checkRenameEnumField31() throws Exception {
    setFieldsForTest("test31");
    projectExplorer.scrollAndselectItem(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.waitVisibleItem(pathToCurrentPackage + "/A.java");
    projectExplorer.sendToItemDownArrowKey();
    projectExplorer.sendToItemEnterKey();
    editor.waitActiveEditor();//w w w . ja  v  a 2  s . c o  m
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(15);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.typeTextIntoEditor("other");
    loader.waitOnClosed();
    editor.typeTextIntoEditor(Keys.ENTER.toString());
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 16)
public void checkRenameGenerics32() throws Exception {
    setFieldsForTest("test32");
    projectExplorer.scrollAndselectItem(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.waitVisibleItem(pathToCurrentPackage + "/A.java");
    projectExplorer.sendToItemDownArrowKey();
    projectExplorer.sendToItemEnterKey();
    editor.waitActiveEditor();//ww  w .  ja  va  2 s  . c o  m
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(14);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.typeTextIntoEditor("g");
    loader.waitOnClosed();
    editor.typeTextIntoEditor(Keys.ENTER.toString());
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 17)
public void checkRenameGenerics33() throws Exception {
    setFieldsForTest("test33");
    projectExplorer.scrollAndselectItem(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.waitVisibleItem(pathToCurrentPackage + "/A.java");
    projectExplorer.sendToItemDownArrowKey();
    projectExplorer.sendToItemEnterKey();
    editor.waitActiveEditor();//  www .j  av  a2  s  . c  om
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(14);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.typeTextIntoEditor("g");
    loader.waitOnClosed();
    editor.typeTextIntoEditor(Keys.ENTER.toString());
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 18)
public void checkRenameGenerics36() throws Exception {
    setFieldsForTest("test36");
    projectExplorer.scrollAndselectItem(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.waitVisibleItem(pathToCurrentPackage + "/A.java");
    projectExplorer.sendToItemDownArrowKey();
    projectExplorer.sendToItemEnterKey();
    editor.waitActiveEditor();/* w w  w.  j a  v a2 s  . c  o  m*/
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(16);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.typeTextIntoEditor("g");
    loader.waitOnClosed();
    editor.typeTextIntoEditor(Keys.ENTER.toString());
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

From source file:org.eclipse.che.selenium.refactor.methods.RenameMethodInInterfaceTest.java

License:Open Source License

private void doRefactoringWithKeys(int cursorPositionLine, int cursorPositionChar, String newName) {
    prepareProjectForRefactor(cursorPositionLine, cursorPositionChar);
    editor.launchRefactorFormFromEditor();
    editor.typeTextIntoEditor(newName);//from   ww w  . j  av a2  s . com
    editor.typeTextIntoEditor(Keys.ENTER.toString());
    loader.waitOnClosed();
    editor.waitTextIntoEditor(contentFromOutA);
}

From source file:org.eclipse.che.selenium.refactor.methods.RenamePrivateMethodTest.java

License:Open Source License

@Test
public void test0() {
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToDefinedLineAndChar(14, 18);
    editor.launchRefactorFormFromEditor();
    editor.typeTextIntoEditor("k");
    editor.typeTextIntoEditor(Keys.ENTER.toString());
    editor.waitTextIntoEditor(contentFromOutB);
}

From source file:org.eclipse.che.selenium.refactor.methods.RenamePrivateMethodTest.java

License:Open Source License

@Test(priority = 1)
public void test2() {
    projectExplorer.waitProjectExplorer();
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToDefinedLineAndChar(14, 18);
    editor.launchRefactorFormFromEditor();
    editor.typeTextIntoEditor("fred");
    editor.typeTextIntoEditor(Keys.ENTER.toString());
    editor.waitTextIntoEditor(contentFromOutB);
}

From source file:org.eclipse.che.selenium.refactor.methods.RenamePrivateMethodTest.java

License:Open Source License

@Test(priority = 2)
public void test10() {
    projectExplorer.waitProjectExplorer();
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToDefinedLineAndChar(13, 18);
    editor.launchRefactorFormFromEditor();
    editor.typeTextIntoEditor("k");
    editor.typeTextIntoEditor(Keys.ENTER.toString());
    editor.waitTextIntoEditor(contentFromOutB);
}