ui.click (ui.contextClick) stuck

WindowTester allows you to easily create and run unit tests for every GUI they build. It can also be used to generate system level tests.

Moderators: gnebling, Eric Clayberg, Dan Rubel, keertip, Phil Quitslund

ui.click (ui.contextClick) stuck

Postby wei » Mon Jun 15, 2009 3:00 pm

I keep hitting the issue of ui.click (ui.contextClick) stuck. An example case is to click a file item on Project Explorer view. I saw the mouse moved to the item to be clicked, but instead of click, it stuck there. And there is no error or exception. This issue randomly happens to the places where ui.click (or ui.contextClick) is used.

Also, I want to know if there is any way to set timeout to the windowtester test case. I don't want the above issue blocks the other test cases.

public class testUiClick extends UITestCaseSWT {

/**
* Main test method.
*/
public void testmytest() throws Exception {
IUIContext ui = getUI();

//open perspective
ui.click(new MenuItemLocator("Window/Open Perspective/Other..."));
ui.wait(new ShellShowingCondition("Open Perspective"));
ui.click(new TableItemLocator("C/C++(.*)?"));
ui.click(new ButtonLocator("OK"));
ui.wait(new ShellDisposedCondition("Open Perspective"));
//create new project with two files
ui.click(new MenuItemLocator("File/New/Project..."));
ui.wait(new ShellShowingCondition("New Project"));
ui.click(new FilteredTreeItemLocator("Plug-in Project"));
ui.click(new FilteredTreeItemLocator("C++/C++ Project"));
ui.click(new ButtonLocator("&Next >"));
ui.click(new LabeledTextLocator("&Project name:"));
ui.enterText("mytest");
ui.click(new TreeItemLocator("Executable/Hello World C++ Project",
new LabeledLocator(Tree.class, "Toolchains:")));
ui.click(new ButtonLocator("&Next >"));
ui.click(new ButtonLocator("&Next >"));
ui.click(new ButtonLocator("&Finish"));
ui.wait(new ShellDisposedCondition("C++ Project"));
ui.wait(new ShellDisposedCondition("Initialize Indexing"));
ui.click(new TreeItemLocator("mytest/src", new ViewLocator(
"org.eclipse.ui.navigator.ProjectExplorer")));
ui
.contextClick(new TreeItemLocator("mytest/src",
new ViewLocator(
"org.eclipse.ui.navigator.ProjectExplorer")),
"New/Source File");
ui.wait(new ShellShowingCondition("New Source File"));
ui.enterText("mytest2.cpp");
ui.click(new ButtonLocator("&Finish"));
ui.wait(new ShellDisposedCondition("New Source File"));

//test click files
for(int i = 0; i < 20; i++)
{
System.out.println("test: " + i);
System.out.println("click file1");
ui.click(new TreeItemLocator("mytest/src/mytest.cpp", new ViewLocator(
"org.eclipse.ui.navigator.ProjectExplorer")));
ui.pause(1000);
System.out.println("click file2");
ui.click(new TreeItemLocator("mytest/src/mytest2.cpp", new ViewLocator(
"org.eclipse.ui.navigator.ProjectExplorer")));
ui.pause(1000);
}
}

}
Last edited by wei on Tue Jun 16, 2009 10:12 am, edited 1 time in total.
wei
 
Posts: 3
Joined: Mon Jun 15, 2009 1:56 pm

Re: ui.click (ui.contextClick) stuck

Postby Phil Quitslund » Tue Jun 16, 2009 10:10 am

Code you post details about your execution environment? (Hardware Architecture, OS version, Eclipse version, JDK version, etc.)

http://downloads.instantiations.com/WindowTesterDoc/integration/latest/docs/html/faq/faq.html#WhatinformationshouldIsendwhencontactingsupport

Thanks!
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am

Re: ui.click (ui.contextClick) stuck

Postby wei » Tue Jun 16, 2009 1:20 pm

Linux sjc-lds-237 2.6.9-67.0.7.ELsmp #1 SMP Wed Feb 27 04:47:23 EST 2008 x86_64 x86_64 x86_64 GNU/Linux
Eclipse SDK Version: 3.4.1
JRE linux x86_1.6.0.011
WindowTester SWT Professional version 3.6.0.200810070520 for Eclipse 3.4
wei
 
Posts: 3
Joined: Mon Jun 15, 2009 1:56 pm

Re: ui.click (ui.contextClick) stuck

Postby Phil Quitslund » Wed Jun 17, 2009 7:20 pm

Thanks!

Have you tried it with a more recent release or beta?

You might give one of those a shot:

http://www.instantiations.com/windowtester/download.html

If the problem persists, please open a ticket with support:

wintest-support@instantiations.com

From there, the support team will work to create a local reproduction of the issue on our end and then see to a fix.
--
Phil Quitslund
Software Engineer
Google, Inc.
Phil Quitslund
Moderator
 
Posts: 491
Joined: Fri Apr 28, 2006 6:26 am


Return to Window Tester

Who is online

Users browsing this forum: No registered users and 1 guest