i have written the following test:
- Code: Select all
IEditorInput eiOne = getPage().getEditor().getEditorInput();
ui.enterText("foobar");
ui.keyClick(WT.ARROW_DOWN);
// ui.wait(new ICondition)
IEditorInput eiTwo = getPage().getEditor().getEditorInput();
assertFalse(eiOne.equals(eiTwo));
getPage() is synchronised and gets current workbench page:
- Code: Select all
IWorkbenchWindow wbWindow = wb.getActiveWorkbenchWindow();
page[0] = wbWindow.getActivePage();
If i print out the editor content, i see, that it is the right editor. Why the assert fails?
Only if I do a save before:
- Code: Select all
ui.click(new MenuItemLocator("File/Save All"));
The assert is true, meaning the two editor contents are not the same any more. Is that a bug of the editor? Or is there perhaps a shell condition with which I can wait for the input?
A general questioin about shell conditions I have is: How do I now what text is on the shell? For example I have:
- Code: Select all
ui.keyClick(SWT.CTRL, 'F');
ui.wait(new ShellShowingCondition("Find and Replace"));
How can I now here that the Text is "Find and Replace"? I cannot see the shell wich is displaying that.
Michael