Hi Tim, Selenium-IDE fits 95% of our needs without any problems (recording and playing tests). The remaining 5% is when page contains ambiguities during test recording or when we need to store state information during test execution.
In the first case, if a page contains two hyperlinks with the same title, selenium-ide will not use link=title target syntax but instead it will generate an xpath expression. The generated xpath expression is dependent to html layout (for exemple : //table/tr[4]/td[2]/a). To avoid to have to correct the test if the layout changes in the future, we tweak this kind of xpath expression into //a[contains(@href, '...') and text()='title']. The second case is an interesting feature of selenium that selenium-ide can not generate it for us. For example, if you want to test sales order creation and do some actions on the newly created order, you will have to store the orderId during test execution and then refer to this orderId in some urls. Selenium provides a memory during test execution in which you can read/write variables. So in this case we have to review the test generated by selenium-ide to include variables usage. These cases are the only ones that require manual corrections if you use selenium-ide to generate tests (corrections can be done via selenium-ide editor interface). Since six months, we have defined some best practices in selenium test writing for OFBiz : All our tests starts with the same three commands : - logout of the application to force the creation of the new session and avoid side effects due to a previous test (example: cart) - login with admin or another user - set locale After each action, we check the presence (or not) of error message with this kind of code : <tr> <td>assertElementNotPresent</td> <td>//[EMAIL PROTECTED]'errorMessage']</td> <td></td> </tr> It should be possible to enhance selenium-ide to automatically generate this test like it does for assertTitle. I hope these few explanations will help you to adopt selenium. Don't hesitate to ask me questions about particular case you may have encountered that is not described is this mail. Peter Le vendredi 26 janvier 2007 à 16:57 -0700, Tim Ruppert a écrit : > Sorry I didn't answer this earlier - I've had great luck with Selenium > and writing code directly. The problem that I ran into was that I > couldn't get the IDE to work well on the pages. Maybe Peter can shed > a little light on this with what he was describing earlier? > > > I've used a ton of record/playback models and very few of them work > reliably - especially the open source ones. I am still working on > getting together a webtest example for everyone to see so that we can > compare the differences. > > > Cheers, > Tim > -- > Tim Ruppert > HotWax Media > http://www.hotwaxmedia.com > > > o:801.649.6594 > f:801.649.6595 > >