Hi Cecilla,

Here are some sample locator strings from our application. You can see a working version of the app to compare against these here: http://www.hericus.com/demo.html

Our Application class has 2 main structures that we use to navigate everything, a pageButtons array, and a pageStack array. All of our locators start from the "app:" prefix, and then follow down either the pageButtons array or pageStack array.

This is how we switch between different workspaces. Use qxClick with any string like this:
"qxh=app:pageButtons/[...@label=\"Builds\"]"
"qxh=app:pageButtons/[...@label=\"Bugs\"]"

Once you are in a workspace, you can activate the "New" menu in the first splitpane by using this type of navigation: "qxh=app:pageStack/[...@name='" + workspace + "']/qx.ui.splitpane.Pane/child[2]/qx.ui.toolbar.ToolBar/child[0]/[...@label='New']"

Note that navigating a splitpane in the existing simulator doesn't work. I had to patch the code in order to allow the child[N] syntax to work correctly for splitpanes.

Once you've clicked on the new menu, then click again to select a named option under it: "qxh=app:pageStack/[...@name='" + workspace + "']/qx.ui.splitpane.Pane/child[2]/qx.ui.toolbar.ToolBar/child[0]/[...@label='New']/[...@menu]/[...@label='" + name + "']"

We make extensive use of TabViews. Here's one that allows you to see if a tab view has shown up or not. Use the standard selenium isElementPresent() function, with a locator like: m_qx.isElementPresent("qxh=app:pageStack/[...@name='" + workspace + "']/qx.ui.splitpane.Pane/child[2]/qx.ui.tabview.TabView/[...@label='" + tabTitle + "']");

If you want to click on a tabview button to activate a specific tab, use something like this: "qxh=app:pageStack/[...@name='" + workspace + "']/qx.ui.splitpane.Pane/child[2]/qx.ui.tabview.TabView/[...@label='" + tabTitle + "']/[...@__childcontrols]/[...@label='" + tabTitle + "']"

Most of our tab pages hold other types of content (as you would expect). Here's one where we are accessing the table attribute on a tab page: "qxh=app:pageStack/[...@name='" + workspace + "']/qx.ui.splitpane.Pane/child[2]/qx.ui.tabview.TabView/[...@label='" + tabTitle + "']/child[0]/[...@table]"

I hope that helps to get you started. Feel free to ask questions about the above, as the syntax can get interesting :-)

Sincerely,

Mr Hericus
[email protected]
http://www.hericus.com/

Daniel Wagner wrote:
Hi,

the qxh locators work with the objects of the qooxdoo application, not DOM objects.

The qxh locator steps are explained in the wiki[1], but to answer your question, yes, you can locate qooxdoo objects using their class names or any of their properties. Check out the qooxdoo application in the Simulator contrib and the corresponding simulation script (tool/selenium/simulation/custom/simulation.js) for some examples.

However, you can only check for one condition per step, so you couldn't search for your TextField using both visibility and its label text.

Feel free to ask if you have any further questions, although I'm afraid I've never really used the Simulator for qooxdoo 0.7-based apps.

Regards,
Daniel

[1]http://qooxdoo.org/contrib/project/simulator/selenium-user-extension

Cecilla Müller schrieb:
Hi,

I'm using Selenium with the 0.1 version of the qooxdoo user extension to test a RAP application. I would like to use 
the qxh locator, but I just don't understand how to use it properly. The examples I find use only the properties 
"label" and "page" e.g. testing http://demo.qooxdoo.org/0.7.2/showcase/index.html#Tab. What kind of 
properties are these? Using Firebug I can't find a property "label" in the DOM for example. If these are 
names of the classes, how do I refer to a textField (qx.ui.form.TextField)? Can I locate a TextField which has to be 
visible an whose ID starts with "Test"?

Thanks for any hint.

Regards,

Fabian
____________________________________________________________________
Neu: WEB.DE FreeDSL Komplettanschluss mit DSL 6.000 Flatrate und
Telefonanschluss für 17,95 Euro/mtl.!* http://produkte.web.de/go/02/


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel



------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & iPhoneDevCamp asthey present alongside digital heavyweights like Barbarian Group, R/GA, & Big Spaceship. http://www.creativitycat.com _______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel


------------------------------------------------------------------------------
Register Now for Creativity and Technology (CaT), June 3rd, NYC. CaT 
is a gathering of tech-side developers & brand creativity professionals. Meet
the minds behind Google Creative Lab, Visual Complexity, Processing, & 
iPhoneDevCamp as they present alongside digital heavyweights like Barbarian 
Group, R/GA, & Big Spaceship. http://p.sf.net/sfu/creativitycat-com 
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to