Running a Web UI test
Before you begin
- For Rational® Safari 7.1 or later: Ensure that you have manually enabled the browser for recording Web UI tests. For instructions, see Enabling Apple Safari for Web UI playing back on a Macintosh computer.
- For Microsoft Edge: Install the latest version of the Microsoft WebDriver and the necessary Windows 10 updates. See the limitation to using Edge browser for Web UI test playback in the Running a Web UI test in the Microsoft Edge browser restriction section.
- To record and play back a test with the Mozilla Firefox and Google Chrome browsers on the Mac operating system, ensure that you have installed the browsers at the default location /Applications.
- Starting with 9.1.1, you can run a test that was recorded in Google Chrome Device Mode. This allows you to emulate tests of web apps on mobile devices. See Recording a test with Google Chrome Device Mode and Running a test recorded in Google Chrome Device Mode.
- Also starting with 9.1.1, you can play back tests in Chrome Headless Mode. This allows you to run tests in an automated testing environment where a visible user interface shell is not required. See Running a test in Google Chrome headless mode.
- Starting with 9.2.1, you can use industry-standard mobile browsers, such as Chrome and Safari,
to run Web UI tests for mobile web applications. You can run tests with Chrome on Android devices
and emulators and with Safari on iOS devices and simulators. This capability uses Appium to actually
run the tests. Before 9.2.1, mobile Web UI tests could only be run in the generic browser that is
bundled with HCL OneTest™ UINote: If you want to run a test on Chrome, you must have installed the appropriate version of Chrome driver for Appium. For more information on the Chrome driver, see http://appium.io/docs/en/writing-running-appium/web/chromedriver/..
About this task
To use a specific browser profile for the test, see Using alternate browser profile for test playback.
You can run a Web UI test in the same web browser that was used for the recording or run the test in other web browsers. You can even run a Web UI test in several browsers simultaneously. You can also run the test as part of keyword execution from IBM® Rational Quality Manager, as part of compound test, or from the Command Line Interface (CLI).
You can run a test that was recorded in Google Chrome Device Mode. This allows you to emulate tests of web apps on mobile devices. See Recording a test with Google Chrome Device Mode and Running a test recorded in Google Chrome Device Mode. You can also play back tests in Chrome Headless Mode. This allows you to run tests in an automated testing environment where a visible user interface shell is not required. See Running a test in Google Chrome headless mode.
When you run a test, the steps in the test looks for the UI objects over and over again until they get the object or timeout. For example, if the step is to click a button with the name Submit, the test will look for the button with that name. If the name of the button changed, the test will keep looking for the button and then timeout. By default, the timeout is set to 10s. You can modify this value for the steps or at the test level. If you modify the timeout value in the step, that value takes precedence over the timeout value specified at the test level.
Web UI tests that were recorded in Internet Explorer, Firefox or Chrome can be played back with the Microsoft Edge browser, but you cannot record them in Microsoft Edge.