QF-Test supports several browsers and is able to control them so that users can record manual interactions with the browser and replay those actions again. To gain full control over the browser QF-Test uses two different approaches which will be explained in the following sections.
Note Both approaches are necessary and they will continue to coexist and be fully maintained. Most browsers can be accessed by only one of the two, the only exceptions are Chrome on Windows and Firefox up to version 43 on Windows and Linux. QF-Test attempts to do the right thing by default but you can take control via the attribute 'Browser connection mode' of the 'Start web engine' node.
|Web testing using QF-Driver connection mode|
This approach integrates the locally installed browser into a wrapper-window. This approach is also called embedding. QF-Test natively embeds the browser into its own window, thus gaining access to its automation-interfaces. By using these interfaces QF-Test can listen for events from the browser and is also able to inject events the other way into the browser.
Native embedding of browsers into a separate window is not working satisfactorily for newer browsers and in case of Microsoft Edge this approach cannot work at all. For this reason an alternative mechanism was implemented in QF-Test 4.1. Explanations on this mechanism can be found in the following section.
|Website Testing using WebDriver|
4.1+ Given that the existing approach using embedding is not maintained anymore by some browser vendors or is not supported at all, a new mechanism was implemented for QF-Test 4.1 to support future browsers and browser versions. This mechanism uses Selenium WebDriver as a bridge between the browser and QF-Test.
Note The WebDriver connection mode is not yet on par with QF-Driver mode in terms of performance and feature completeness (see subsection 14.2.4). When recording, events may get lost. For the time being we recommend to primarily use QF-Driver mode for recording. Please see the system requirements in section 1.1 for detailed information about which browsers are supported for each connection mode and operating system.
|WebDriver in general|
WebDriver is slowly evolving into a W3C-standard for interacting with web browsers. (http://www.w3.org/TR/webdriver). WebDriver is a remote control interface that enables introspection and control of browsers, based on a platform and language-neutral wire protocol.
The various browser vendors have agreed on this quasi-standard, so that the WebDriver integration is partly implemented directly by the vendors themselves. Partially the integration is based on plugins, some vendors already include the integration in the default setup of their browsers.
QF-Test uses the WebDriver interfaces to interact with the browser. Since the WebDriver approach is only partially fitting the concepts of QF-Test, its web engine was extended so that most of QF-Test's functionality is also available via WebDriver, including the added benefits like synchronization, abstraction of components etc.
Note If you use the WebDriver mode, you are no longer limited to Firefox if you want to specify a browser installation folder using the attribute 'Directory of browser installation' of the 'Start web engine' node. If no matching browser can be localized in the specified directory, an exception will be thrown. If no directory is specified, QF-Test will try to start a default browser of the given browser type.
Note QF-Test needs to deep inspect the browser content in order to enable the familiar testing features (e.g. event and check recording, feature based component recognition, web and custom resolvers) in WebDriver mode. This might provoke in some browsers a warning based on mixed content display or an untrusted certificate. If this warning or error message only appears while running the web site in testing mode, you can safely ignore it.
|WebDriver with Microsoft Edge|
Because Microsoft Edge comes without pre-installed WebDriver support, the WebDriver integration needs to be installed manually once.
On newer systems, the Microsoft WebDriver is a so called "Feature on Demand". Navigate to
"Windows-Settings > Apps > Apps & features > Manage optional features and installing" and add the
"Microsoft WebDriver" as new feature (Alternatively, run the following in an elevated command prompt:
DISM.exe /Online /Add-Capability /CapabilityName:Microsoft.WebDriver~~~~0.0.1.0).
On older Systems (up to Windows 10-1803) navigate your web browser
to the Microsoft WebDriver website
and download and install the WebDriver version matching your operating system.
In addition, a loopback exemption needs to be defined for the Edge browser. Windows 10 uses an isolation technology that may prevent requests being sent from Edge to QF-Test. Although this does not always happen, we recommend enabling the loopback before testing with Microsoft Edge.
To enable loopback for Edge, open a command shell with administration rights and execute:
CheckNetIsolation LoopbackExempt -a -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
To disable loopback for Edge, open a command shell with administration rights and execute:
CheckNetIsolation LoopbackExempt -d -n="Microsoft.MicrosoftEdge_8wekyb3d8bbwe"
Details about for enabling loopback for Windows apps can be found in the Windows Dev Center.
After successful installation you can also use Microsoft Edge as browser in your tests.
|WebDriver with Safari|
There are two options to use Safari for web testing: By means of the SafariDriver bundled with Safari 10+ on macOS 10.11+, or using a Safari extension. Both methods require a manual user setup.
To activate the Apple SafariDriver, open the Safari Preferences and select "Show Develop menu
in menu bar". In this menu, activate the "Allow Remote Automation" option. After that, open a Terminal
window and execute once the command
/usr/bin/safaridriver -p 0 to authorize the driver.
Note Due to special security restrictions imposed by the Apple SafariDriver, the interaction between QF-Test and Safari is limited in the following ways:
For a limited time, it will be possible to control Safari using the Selenium SafariDriver extension.
To activate this, select QF-Test in Finder and show the package contents using the context menu.
Navigate to the folder
and copy the file
SafariDriver.safariextz to a local directory. Then open this file to
install the extension. Please uninstall any older version of the extension before.
|Known limitations of the WebDriver mode|
The WebDriver connection mode is under active development. Due to this, some features known from QF-Driver connection mode are not yet available, mostly due to restrictions of the WebDriver specification.
|Web-Tests without visible Window|
4.2+ Using the WebDriver-connection-mode it is possible to drive Firefox and Chrome in the so called "headless"-mode. In this mode, the browser is started in the background, but without any visible window on the screen. All interactions with the webpage are executed inside this "invisible" window.
To execute an existing web test using the "headless"-mode, simply change the type of browser in
the 'Start web engine' step from
headless-firefox. Please note that the "headless"-mode
is only supported since Chrome 60 and Firefox 57.
|Last update: 09/11/2018
Copyright © 1999-2019 Quality First Software GmbH