click event on a table-cell with id ?

26 views
Skip to first unread message

enchantgy

unread,
Apr 19, 2011, 12:08:52 PM4/19/11
to cubictest-users
Hi All,

I am setting up a test on a rich-faces website. The way it has
implemented ajax-driven tabs, is by having a onMouseUp event on a
table cell. (when the tab is clicked, ajax loads a table from the
server)

<td onmouseout="javascript stuff to load tab" id="tab_lbl">Tab Text</
td>

In Sellenium, I am able to simulate this click by just having a click
event on id tab_lbl

In CubicText there is no option to have a click event on just an
element with an id (without specifying what kind of element it is)

I have tried setting up the user-action as a click on the "Tab Text"
but CubicTest won't accept a user-interaction on a text-element.

When I record the test using the selenium recorder, the tab-switch is
completely skipped (when executing the test, I have to click on the
tab myself)

Any ideas?

(I like the flexible way CubicTest allows you to select elements
better than the way selenium does this, and I like the gui. Otherwise
I would just use selenium)

rcmcd...@gmail.com

unread,
Apr 19, 2011, 2:44:20 PM4/19/11
to cubicte...@googlegroups.com
Create a custom step which directly calls the selenium code, and implement it in selenium supported language of you choice (we use java).

Then you can use the custom step anyplace you would call any othe cubictest step.

Rhonda
Sent from my feels-like-its-always-on-Berry

enchantgy

unread,
Apr 19, 2011, 4:03:57 PM4/19/11
to cubictest-users
Thanks for your response Rhonda!

I actually already figured it out on my own (from a similar problem
someone else was having). Maybe I should have done a bit more
investigating before I posted the question. Yesterday was my first day
"playing" with CubicTest. But maybe it will help someone else.

I ended up using a Context element (which can have an id) and on which
you can have a (click) User Interaction.

I need to get under the hood of things before I go any further.
(checking database state before verifying the UI...

First impression of CubicTest is pretty good so far.
Reply all
Reply to author
Forward
0 new messages