Can Selenium be used to test single-page JavaScript applications?

Beginner testing UI here, can Selenium be used to test user interfaces of single-page JavaScript applications?

Applications use async AJAX / Web Socket requests, service endpoints are tested, but I also need interface testing.

Besides Selenium, what other tools would you recommend?

+9
source share
3 answers

This is great for pages that are heavy for ajax, you just need to fine-tune the timeouts for each method you call, as there will not necessarily be an obvious signal to Selenium when the ajax method completes (for example, when the page finishes loading).

using checkout timeout:

http://seleniumhq.org/docs/04_webdriver_advanced.html

+3
source

Yes. It can be used for this. If you can simulate button presses and wait for the results to load.

You don’t have to worry about a one page application.

It has tools in which you record your steps and do test cases. Give it a try. It should be very easy even for a beginner.

0
source

Of course it can be used! Typically, I combine Selemium with Applitools . Applitools offer a rich and unique experience and can integrate with many other testing environments.

Finding the visual difference between two shots or two tests is only half the story! Fun begins when you want to find the real source of this difference. I have been there many times, and now, thanks to the recent addition of Applitools, Applitools Root Cause Analyis makes your life much easier by finding the exact difference in DOM or CSS. Really useful tool and recommended for visual / user testing.

Bill

0
source

All Articles