On Tue, 20 Nov 2007, Gerolf Seitz wrote:
> you can call setMarkupId(String) in the constructor of your components.
> just make sure that the ids are unique in a single page.

This works sometimes, and is a good idea. Having stable HTML
ids for unique HTML elements also makes facilitates good CSS 
styling, I understand.

However, when this is not practical, you can omit the HTML 
id altogether from the markup, because then Selenium IDE 
will automatically look for other ways of identifying the
element. These are typically xpath expressions operating on 
the DOM tree. You can of course also write them yourself to 
the test script, if you like xpath ;)

When using Selenium in a more white-box-way, testing single
components within developer tests, there is also the 
possibility of getting the dynamic markup id directly from
the component object. This can be done at least with 
SeleniumTestCase of Wicket Bench and I believe also with
jdave-wicket-selenium 

  http://www.jdave.org/modules.html

Best wishes,
Timo

-- 
Timo Rantalaiho           +358-45-6709709
Reaktor Innovations Oy    <URL: http://www.ri.fi/ >

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to