myfaces-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bertrand, Shawn R" <>
Subject RE: Selenium and badboy on JSF
Date Mon, 05 Nov 2007 20:39:13 GMT
You could use the location strategy feature introduced in Selenium
Remote Control 0.9.2:


We use it for the Trinidad tree control to allow our tests to click on
the arrows next to each tree node regardless of the underlying index of
the node (our locator is the displayed tree node text).  This of course
is possible only because the tree is rendered in a very flat way using
the table renderer (thank goodness for that...).




Shawn Bertrand

Tyco Electronics Corporation



From: Yaron Spektor [] 
Sent: Monday, November 05, 2007 2:13 PM
To: MyFaces Discussion
Subject: Selenium and badboy on JSF



I was trying out Selenium and badboy today.

I couldn't make any of them work for me.

For example I used Selenium IDE and tried to record a very short

1. Go to a search page 

2. click an id of a user ("1111") 

3. click on "search" ("form1:doSearch") 

4. from a list of users in a table, click on the link of this user id

As I am working with JSF creating a dynamic id for each component the
first time around I recorded "form1:_id25:0:comp_760" after that I got
"form1:_id25:0:comp_930" etc. (the comp number changed). How do I make
Selenium (or badboy for that matter) realize this is the same link? I
googled this for a long time not finding any solution. I tried xpath but
it gave me the same "form1:_id25:0:comp_760", I also tried using the
xpath table location and it didn't work: ("//tr[2]/td/table.1.0") 




Here is the source from selenium IDE on my first attempt: 




<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>New Test</title>



<table cellpadding="1" cellspacing="1" border="1">


<tr><td rowspan="1" colspan="3">New Test</td></tr>





























View raw message