Example usage for org.openqa.selenium Keys ARROW_LEFT

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

Introduction

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

Prototype

Keys ARROW_LEFT

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

Click Source Link

Usage

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

License:Open Source License

@Test(priority = 5)
public void checkRenamePrivateField5() throws Exception {
    setFieldsForTest("test5");
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();//from   w  ww. j  a  v  a2  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.typeAndWaitNewName("fY");
    refactor.sendKeysIntoField("o");
    refactor.sendKeysIntoField("u");
    refactor.waitTextIntoNewNameField("fYou");
    loader.waitOnClosed();
    refactor.setAndWaitStateUpdateReferencesCheckbox(true);
    refactor.clickOkButtonRefactorForm();
    loader.waitOnClosed();
    refactor.waitRenameFieldFormIsClosed();
    loader.waitOnClosed();
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 6)
public void checkRenamePrivateField6() throws Exception {
    setFieldsForTest("test6");
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();//  w w  w .  j av 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.typeAndWaitNewName("fY");
    refactor.sendKeysIntoField("o");
    refactor.sendKeysIntoField("u");
    refactor.waitTextIntoNewNameField("fYou");
    loader.waitOnClosed();
    refactor.setAndWaitStateUpdateReferencesCheckbox(true);
    refactor.clickOkButtonRefactorForm();
    loader.waitOnClosed();
    refactor.waitRenameFieldFormIsClosed();
    loader.waitOnClosed();
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 7)
public void checkRenamePrivateField7() throws Exception {
    setFieldsForTest("test7");
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();/*from  w  w  w . j  a v a2 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.typeAndWaitNewName("fS");
    refactor.sendKeysIntoField("mal");
    refactor.sendKeysIntoField("l");
    refactor.waitTextIntoNewNameField("fSmall");
    loader.waitOnClosed();
    refactor.setAndWaitStateUpdateReferencesCheckbox(true);
    refactor.clickOkButtonRefactorForm();
    loader.waitOnClosed();
    refactor.waitRenameFieldFormIsClosed();
    loader.waitOnClosed();
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 8)
public void checkRenamePrivateField8() throws Exception {
    setFieldsForTest("test8");
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();/*from   w  w w.  ja va 2s . 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.typeAndWaitNewName("g");
    loader.waitOnClosed();
    refactor.setAndWaitStateUpdateReferencesCheckbox(true);
    refactor.clickOkButtonRefactorForm();
    refactor.waitRenameFieldFormIsClosed();
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 9)
public void checkRenamePrivateField9() throws Exception {
    setFieldsForTest("test9");
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();/*from  ww  w  . j  av a 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.typeAndWaitNewName("fS");
    refactor.sendKeysIntoField("mal");
    refactor.sendKeysIntoField("l");
    refactor.waitTextIntoNewNameField("fSmall");
    loader.waitOnClosed();
    refactor.setAndWaitStateUpdateReferencesCheckbox(true);
    refactor.clickOkButtonRefactorForm();
    refactor.waitRenameFieldFormIsClosed();
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 10)
public void checkRenamePrivateField10() throws Exception {
    setFieldsForTest("test10");
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();/*from   w  w w  .j a  v  a  2 s .  c  om*/
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(19);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    loader.waitOnClosed();
    refactor.typeAndWaitNewName("fElem");
    refactor.sendKeysIntoField("ent");
    refactor.sendKeysIntoField("s");
    refactor.waitTextIntoNewNameField("fElements");
    loader.waitOnClosed();
    refactor.setAndWaitStateUpdateReferencesCheckbox(true);
    loader.waitOnClosed();
    refactor.clickOkButtonRefactorForm();
    loader.waitOnClosed();
    refactor.waitRenameFieldFormIsClosed();
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 11)
public void checkRenamePrivateField11() throws Exception {
    setFieldsForTest("test11");
    projectExplorer.openItemByPath(pathToCurrentPackage);
    consoles.closeProcessesArea();/* w w  w  . j a  va 2  s  . co  m*/
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(21);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    loader.waitOnClosed();
    refactor.typeAndWaitNewName("fElem");
    refactor.sendKeysIntoField("ent");
    refactor.sendKeysIntoField("s");
    refactor.waitTextIntoNewNameField("fElements");
    loader.waitOnClosed();
    refactor.setAndWaitStateUpdateReferencesCheckbox(true);
    loader.waitOnClosed();
    refactor.clickOkButtonRefactorForm();
    loader.waitOnClosed();
    refactor.waitRenameFieldFormIsClosed();
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

@Test(priority = 12)
public void checkRenameUnicode12() throws Exception {
    setFieldsForTest("test12");
    projectExplorer.openItemByPath(pathToCurrentPackage);
    projectExplorer.openItemByPath(pathToCurrentPackage + "/A.java");
    editor.waitActiveEditor();/*  w  ww  .j a  v a 2s  .com*/
    editor.waitTextIntoEditor(contentFromInA);
    editor.setCursorToLine(14);
    editor.typeTextIntoEditor(Keys.END.toString());
    editor.typeTextIntoEditor(Keys.ARROW_LEFT.toString());
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameFieldFormIsOpen();
    refactor.typeAndWaitNewName("fe");
    refactor.sendKeysIntoField("e");
    refactor.sendKeysIntoField("l");
    refactor.waitTextIntoNewNameField("feel");
    loader.waitOnClosed();
    refactor.setAndWaitStateUpdateReferencesCheckbox(true);
    refactor.clickOkButtonRefactorForm();
    loader.waitOnClosed();
    refactor.waitRenameFieldFormIsClosed();
    loader.waitOnClosed();
    editor.waitTextIntoEditor(contentFromOutA);
    editor.closeFileByNameWithSaving("A");
}

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

License:Open Source License

private void doRefactorByWizard(int cursorPositionLine, int cursorPositionChar, String newName) {
    prepareProjectForRefactor(cursorPositionLine, cursorPositionChar);
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameMethodFormIsOpen();
    refactor.typeNewName(newName);/*from  w  w  w  .ja v  a 2  s  .  com*/
    refactor.sendKeysIntoField(Keys.ARROW_LEFT.toString());
    refactor.sendKeysIntoField(Keys.ARROW_LEFT.toString());
    refactor.clickOkButtonRefactorForm();
}

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

License:Open Source License

private void doRefactorByWizardWithExpectedWarningMessage(int cursorPositionLine, int cursorPositionChar,
        String newName, String expectedWarningMessage) {

    prepareProjectForRefactor(cursorPositionLine, cursorPositionChar);
    editor.launchRefactorFormFromEditor();
    editor.launchRefactorFormFromEditor();
    refactor.waitRenameMethodFormIsOpen();
    refactor.typeNewName(newName);/*  w ww. j ava 2  s . c  om*/
    WaitUtils.sleepQuietly(1);
    refactor.sendKeysIntoField(Keys.ARROW_LEFT.toString());
    refactor.sendKeysIntoField(Keys.ARROW_LEFT.toString());
    WaitUtils.sleepQuietly(1);
    refactor.clickOkButtonRefactorForm();
    askDialog.waitFormToOpen();
    askDialog.containsText(expectedWarningMessage);
    askDialog.clickCancelBtn();
    askDialog.waitFormToClose();
    refactor.clickCancelButtonRefactorForm();
}