Web testing
This chapter describes how to test web applications and web sites using Ranorex Studio. Thanks to the Ranorex plug-ins for Microsoft Internet Explorer, Mozilla Firefox, Google Chrome, and Chromium, building and running web tests is essentially the same as doing so for desktop tests. However, there are some differences and important considerations. We’ll explain these in the various subchapters.
In this chapter
Supported browsers
Ranorex Studio supports the following browsers for test automation:
- Microsoft Internet Explorer
- Microsoft Edge (Chromium-based)
- Microsoft Edge (Legacy)
- Mozilla Firefox
- Google Chrome
- Chromium
Ranorex Studio uses special browser plug-ins to enable test automation with these browsers.
Note
You can test even more platform and browser combinations with our ⇢ Selenium WebDriver integration.
Web testing overview
Web testing and desktop testing in Ranorex Studio are very similar. The basic web testing process in Ranorex Studio is as follows:
Note
Web sites can have highly complex structures. This is why it may sometimes be a good idea or even necessary to extend the above process by manually tweaking the recorded test with additional code. We’ll cover this in the later subchapters.
Recommended knowledge
Before you start web testing, you should be familiar with the basics of how web sites work. You should also understand the concepts covered in the following Ranorex-Studio chapters:
Ranorex Studio fundamentals
The ⇢ Ranorex Studio Fundamentals contain the chapters dealing with all the basic elements of working with Ranorex Studio, like actions, repositories, and reporting.
Ranorex Studio advanced and expert
For web testing, we recommend reading through the advanced chapters ⇢ RanoreXPath and ⇢ Ranorex Spy. Also, knowing your way around ⇢ code modules and the ⇢ user code library will be helpful when tweaking web tests with additional code.
Create a new web test
We’ll create a new web test using the ⇢ RocketStart wizard.
On the Ranorex Studio Start Page, click New test solution using wizard… or go to File > New > Solution using wizard…
Click Web.
Follow the instructions of the wizard.
When asked to select the recording behavior, select Add browsers to whitelist if your test will only cover interactions with the previously selected browser. If you’re also going to interact with desktop applications and want this in your test, select Do not use whitelisting.
On the final screen, click Finish. Ranorex Studio will then open the prepared solution.
Structure of the web test project
Once you’ve finished setup, Ranorex Studio opens in the test suite view with a simple prebuilt desktop test.
Test suite view
This is where you build and control your tests.
Your project comes with a simple prebuilt test suite. It contains a test case with three recording modules:
Recording module view
In the recording module view of Recording1, you can record and manage test actions.
Empty actions table
This is where your recorded actions appear.
Reference
The different working environments are explained in
Ranorex Studio fundamentals > Ranorex Studio > ⇢ Working environment and views.
Working with recording modules is explained in
Ranorex Studio fundamentals > ⇢ Ranorex Recorder.
Working with the test suite and structuring tests is explained in
Ranorex Studio fundamentals > ⇢ Test suite.