Hi,
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
session:
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
("form1:_id25:0:comp_760").
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:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>New Test</title>
</head>
<body>
<table cellpadding="1" cellspacing="1" border="1">
<thead>
<tr><td rowspan="1" colspan="3">New Test</td></tr>
</thead><tbody>
<tr>
<td>open</td>
<td>/proj/employeeSearch.faces</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>form1:_id22</td>
<td>1111</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>form1:doSearch</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>form1:_id25:0:comp_760</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
Yaron