This topic explains how specific browser extensions and configurations can be applied to SOAtest's web scenario recording and playback.
In this section:
Table of Contents | ||
---|---|---|
|
Chrome
To use specific Chrome plugins or settings for web functional tests, you need to configure Chrome to use SOAtest's user-data directory for web scenario recording and playback. The process is slightly different for each.
...
Installing the Extension
Launch Chrome with the following command line:
Code Block language text <CHROME_INSTALL_DIR> --user-data-dir="<SOATEST_INSTALL_DIR>\plugins\com.parasoft.ptest.libs.web_<VERSION>\root\browsers\chrome\userDataDir"
- After the browser opens, install the extension and/or perform the configuration in the normal manner.
Using the Extension During Playback
Launch Chrome with the following command line:
Code Block | ||
---|---|---|
|
...
<SOATEST_INSTALL_DIR>/<SOATEST_EXECUTABLE> -J-Dcom.parasoft.browser.BrowserPropertyOptions.CHROME_ARGUMENTS="--user-data-dir='<SOATEST_INSTALL_DIR>\plugins\com.parasoft.ptest.libs.web_<VERSION>\root\browsers\chrome\userDataDir'" |
...
Alternatively, you can use an Extension tool with a script to set the system property. An example using Groovy is shown below:
Code Block | ||
---|---|---|
| ||
def setUserDataDir(input, context) { System.setProperty("com.parasoft.browser.BrowserPropertyOptions.CHROME_ARGUMENTS", "--user-data-dir="+System.getProperty("install.root")+"/browsers/chrome/userDataDir"); } |
Firefox
Before you can install extensions, you first need to open the appropriate SOAtest Firefox profile. There are two different ways to open this profile:
- Directly open the profile (using a command-line argument).
- Let SOAtest open the profile during playback.
Directly Opening the SOAtest Firefox Profile
To directly open the SOAtest Firefox profile:
- Close all instances of Firefox.
- Start Firefox with the command line
<Firefox_Installation_Directory> -ProfileManager
- Click Create Profile to create a new profile.
- Click through the wizard until you reach the step to choose a profile folder.
- Click Choose Folder and select the <INSTALL>/plugins/com.parasoft.ptest.libs.web_<VERSION>/root/browsers/ff folder.
- Click Finish.
- Select the new profile that you created and click Start Firefox.
You can now install Firefox extensions and configure settings in the normal manner.
Letting SOAtest Open the Profile During Playback
With this method, extensions must be installed and configured during playback—not during recording.
...