After a few operations, adding a contact I try to click the "File" menu but by then the application has lost focus and the mouse is located in the top left corner of my other screen!
Here is the test code:
- Code: Select all
public void testTest3() throws Exception {
IUIContext ui = getUI();
ui.click(new MenuItemLocator("File/New Contact..."));
ui.wait(new ShellShowingCondition(""));
ui.click(new LabeledTextLocator("First Name"));
ui.enterText("Kalle");
ui.keyClick(WT.TAB);
ui.enterText("Anka");
ui.keyClick(WT.TAB);
ui.click(new ButtonLocator("&Finish"));
ui.click(new MenuItemLocator("File/New Contact..."));
ui.wait(new ShellShowingCondition(""));
ui.click(new LabeledTextLocator("First Name"));
ui.enterText("Musse");
ui.click(new LabeledTextLocator("Last Name"));
ui.enterText("Pigg");
ui.click(new LabeledTextLocator("Street"));
ui.click(new ButtonLocator("&Finish"));
TableItemLocator tableItemLocator = new TableItemLocator("Anka,Kalle", new ViewLocator("rcpContactMngr.view"));
ui.click(tableItemLocator);
ui.ensureThat(new ShellLocator("RCP Contacts Editor").hasFocus());
ui.click(new MenuItemLocator("File/Exit"));
}
What can i be doing wrong?
Regards
Peter
I have a dual screen setup on a Windows XP (64-bit) pc