Submit and vote on feature ideas.

Welcome to the new Parasoft forums! We hope you will enjoy the site and try out some of the new features, like sharing an idea you may have for one of our products or following a category.

Browser playback not startingup chrome browser

Baahubali
Baahubali Posts: 14
edited September 2017 in SOAtest

I have a requirement

  • Navigate to webpage and generate a token. I tried using the browser playback option, but I getting the below error

  • I tried updating the drivers but no luck.

Comments

  • jakubiak
    jakubiak Posts: 795 admin

    What versions of SOAtest and Chrome are you using?

  • Baahubali
    Baahubali Posts: 14

    I am using SOA 9.9 and chrome 60.0.3112.113

  • tony
    tony Posts: 25 ✭✭
    edited September 2017

    It sounds like the Selenium Chrome extension is blacklisted. Please speak with your administrator to whitelist the Chrome extension. The registry keys are at:
    HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Google\Chrome(ExtensionInstallBlackList / ExtensionInstallWhiteList)

    The key to whitelist is "aapnijgdinlhnhlmodcfapnahmbfebeb".

    Alternately, you can try to substitute the chrome executable with a script that launches the chrome executable plus the argument --disable-extensions, but note that this will disable windowing functionality (such as Maximize) and may not work for certain versions of the Chrome driver:

    1. Create a file called chrome.bat with the following content (update the path to chrome.exe as necessary):
      echo off
      start "" "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" --disable-extensions %*
    2. Move chrome.bat to the same folder as chrome.exe (so, C:\Program Files (x86)\Google\Chrome\Application\ in the example above)
    3. In SOAtest under Parasoft > Preferences > Browser change the Chrome Executable path to chrome.bat (C:\Program Files (x86)\Google\Chrome\Application\chrome.bat in the example above)

    This is a known limitation of the Selenium Chrome driver. See https://bugs.chromium.org/p/chromedriver/issues/detail?id=639#c28 for details.

  • Baahubali
    Baahubali Posts: 14

    Thanks Tony
    I have done as directed, the browser is opening without a error message but the test is failing in the tool with below message

  • tony
    tony Posts: 25 ✭✭

    If you have not already, you must update chromedriver.exe in:
    \9.9\eclipse\plugins\com.parasoft.xtest.libs.web_9.9.\root\browsers\webdriver\chrome\windows\x86

    1. Back up the existing chromedriver.exe in that folder
    2. Download the latest chromedriver.exe from https://sites.google.com/a/chromium.org/chromedriver/downloads
    3. Copy the new chromedriver.exe (extracted from the zip file) to the x86 folder from above
  • Baahubali
    Baahubali Posts: 14
    edited September 2017

    Hi Tony
    updating the driver worked.
    The tool is able to navigate to the desginated page.
    I added a browserplayback tool and given Navigate action to go the page, now I have to click on a button and save the token generated in the further step. How can I accomplish this?

  • tony
    tony Posts: 25 ✭✭
    edited September 2017

    I think you want to record a scenario and set up an extraction. For details on how to accomplish this, please review the product documentation under Help: Help Contents. In particular:

    • For recording, see SOAtest User's Guide: SOAtest Tutorial: Web Functional Testing
    • For extracting a value from a page, see SOAtest User's Guide: Functional/Integration Testing: Web Functional Tests: Validating or Storing Values
    • For extracting a value directly from traffic (such as in a response header), see SOAtest User's Guide: Functional/Integration Testing: End-to-End Test Scenarios: Adding Test Outputs. Search for "HTTP traffic".
  • whaaker
    whaaker Posts: 59
    edited July 2020

    Update:

    SOAtest 2020.1 has added functionality to disable Selenium WebDriver's use of Chrome Extensions from a SOAtest Extension Tool used as a Setup Test prior to executing Web Functional Tests. This solution mitigates the need to whitelist the Selenium ChromeDriver Extension, but comes with a couple caveats:

    • Window resizing will not work
    • Capturing screenshots will not work

    Use the following script in an Extension Tool that is configured to run prior to your Web Functional Tests to disable extensions during Web Functional playback:
    def setCommandLine() { System.setProperty("webtool.browsercontroller.webdriver.thirdparty.strategy.ChromePropertyOptions.DISABLE_AUTOMATION_EXTENSION", "true"); }