I have been asked to record a long running scenario which involves pages of functionality for the life-cycle of a patient from registration to billing. I tried Selenium IDE but it is flaky, giving replay errors of what it just recorded. When i try Selenium 2, I get into DOM and XPATH problems. Selenium 2 is meant for unit testing i believe. What are the open source alternatives which scale to 5 minute scenario record and replay ? I know this is a subjective question, which might have been asked before, but the options might have improved.
4 Answers
We use Selenium 2
on a daily basis (driven by groovy scripts but that's not the point) to run long running scenarii involving multi-websites connections [and even mail confirmations verification]. It's very stable when a proper error handling is done. The key to success with long scenarios is "expect to fail". Like in a real world, when you sometime have to click twice on a button

- 10,046
- 1
- 27
- 37
You have to use the WEbdriver and not the recording in IDE. You have to use Paje Object Model to make the project stable. see this article: https://weblogs.java.net/blog/johnsmart/archive/2010/08/09/selenium-2web-driver-land-where-page-objects-are-king

- 325
- 1
- 4
- 15
Selenium Web driver will actually work. Xpath problems might be due to page loading time issues. Include Implicit or Explicit waits in your selenium code.
Even Thread.sleep(milliseconds) will fix the issues to some extent.

- 11
- 1
I would actually suggest maybe switching over to Watir-webdriver with PageObject if you are going to be using long-running scenarios. We have extremely long scenarios in an AJAX application and could not solve the problem with Selenium. Switching over to watir-webdriver and the page-object gem allowed us to reuse pages with proper waits, and no failures.

- 1,312
- 1
- 20
- 41