You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@myfaces.apache.org by Paul Spencer <pa...@apache.org> on 2007/06/05 15:50:36 UTC

Any one using Selenium to test JSCook Menus?

I am using Selenium to test the UI portion of my application. Currently 
I am having trouble testing the menus generated by the JSCookMenu. 
Specifically I do not know what to enter for "Target" when trying to 
click on the menu using the "click" command.

Is any testing JSCookMenus with Selenium?

What do you use for "Target" of the desired menu item for the click command?

Paul Spencer



Re: Any one using Selenium to test JSCook Menus?

Posted by Paul Spencer <pa...@apache.org>.
Svi,
Thank you point me to user-extensions.  I was hoping for a simpler 
solution :)

Paul Spencer

Svilen Ivanov wrote:
> Hi,
> 
> I use selenium to test t:tree2. My problem was how to locate the [+]
> or [-] icon in front of specific node. I ended up writing my own
> locator (in selenium terms) that traverses the DOM near the node's
> text and finds image tags with specific URL (plus.png/minus.png).
> Locating the image makes easy to call "Click" so the tree will expand.
> This way I can locate the [+] or [-] based on the text in the tree
> 
> See [1] as example how to build locator
> 
> Regards,
> Svi
> 
> [1] 
> http://svn.openqa.org/svn/selenium-core/trunk/src/main/resources/core/scripts/user-extensions.js.sample 
> 
> (locateElementBy*)
> 
> 2007/6/5, Paul Spencer <pa...@apache.org>:
>> I am using Selenium to test the UI portion of my application. Currently
>> I am having trouble testing the menus generated by the JSCookMenu.
>> Specifically I do not know what to enter for "Target" when trying to
>> click on the menu using the "click" command.
>>
>> Is any testing JSCookMenus with Selenium?
>>
>> What do you use for "Target" of the desired menu item for the click 
>> command?
>>
>> Paul Spencer
>>
>>
>>
> 


Re: Any one using Selenium to test JSCook Menus?

Posted by Svilen Ivanov <sv...@gmail.com>.
Hi,

I use selenium to test t:tree2. My problem was how to locate the [+]
or [-] icon in front of specific node. I ended up writing my own
locator (in selenium terms) that traverses the DOM near the node's
text and finds image tags with specific URL (plus.png/minus.png).
Locating the image makes easy to call "Click" so the tree will expand.
This way I can locate the [+] or [-] based on the text in the tree

See [1] as example how to build locator

Regards,
Svi

[1] http://svn.openqa.org/svn/selenium-core/trunk/src/main/resources/core/scripts/user-extensions.js.sample
(locateElementBy*)

2007/6/5, Paul Spencer <pa...@apache.org>:
> I am using Selenium to test the UI portion of my application. Currently
> I am having trouble testing the menus generated by the JSCookMenu.
> Specifically I do not know what to enter for "Target" when trying to
> click on the menu using the "click" command.
>
> Is any testing JSCookMenus with Selenium?
>
> What do you use for "Target" of the desired menu item for the click command?
>
> Paul Spencer
>
>
>