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.

Installing the Extension

  1. Launch Chrome with the following command line:

    <CHROME_INSTALL_DIR> --user-data-dir="<SOATEST_INSTALL_DIR>\plugins\com.parasoft.ptest.libs.web_<VERSION>\root\browsers\chrome\userDataDir"
  2. 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:

<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:

def setUserDataDir(input, context) {
    System.setProperty("com.parasoft.browser.BrowserPropertyOptions.CHROME_ARGUMENTS", "--user-data-dir="+System.getProperty("install.root")+"/browsers/chrome/userDataDir");
}
  • No labels