3 ms·
If you have a single-page JavaScript application, I would use CasperJS. The JavaScript engines are functionally almost equal if you use frameworks. The usual "c
by iso-8859-1 14y ago
If you have a single-page JavaScript application, I would use CasperJS. The JavaScript engines are functionally almost equal if you use frameworks. The usual "clickAndWait" Selenium verb doesn't work with single-page apps since it expects the page to reload. See http://stackoverflow.com/questions/3703458/click-clickandwait-not-working http://stackoverflow.com/questions/3703458/click-clickandwai... Obviously, this is not a problem with CasperJS and PhantomJS, they are much more tightly integrated with the browser, and you can click elements by ID without needing the ugly "waitForElementPresent" hack. The only issue I've had with CasperJS/PhantomJS is that you can't reliably test Emscriptened apps since the QtWebkit version is old and doesn't have Float64Array support.
If you want to test for layout issues, or if you need something more stable, use Selenium. PhantomJS 1.8 has WebDriver support: http://phantomjs.org/release-1.8.html http://phantomjs.org/release-1.8.html If you want headless Selenium.