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.

How to Force SOATest to Start Edge in InPrivate Mode

Speedy993
Speedy993 Posts: 88

I have a large number of tests that run in Microsoft Edge (the browser we must use here) and I need to run it in InPrivate mode because of mandated multi-factor authentication. I do have InPrivate mode working in the Selenic tests but am not sure how to implement this in SOATest. Searches for this in the Forum did not return any helpful results.

Any suggestions?

Thanks!

Comments

  • Speedy993
    Speedy993 Posts: 88

    So far all the suggestions I have found describe how to set InPrivate or Incognito are for Selenium. Is there not a property or configuration setting to do this in SOATest?

  • benken_parasoft
    benken_parasoft Posts: 1,364 ✭✭✭
    edited June 25

    Edge must be started with the "-inprivate" command line argument. Unfortunately,SOAtest does not expose any mechanism to pass extra command line arguments to Edge.

    On Linux, I can create a small bash script that delegates to the real "microsoft-edge".

    #!/usr/bin/env bash
    exec /usr/bin/microsoft-edge-stable -inprivate "$@"
    

    Let's say the script was saved as /usr/bin/microsoft-edge-wrapper.sh. I can then use "update-alternatives" to point to my script:

    sudo update-alternatives --install /usr/bin/microsoft-edge microsoft-edge /usr/bin/microsoft-edge-wrapper.sh 100
    sudo update-alternatives --set microsoft-edge /usr/bin/microsoft-edge-wrapper.sh
    

    I am not aware of a trick like this for Windows.

  • Speedy993
    Speedy993 Posts: 88

    I finally have time to get back to this. I created a Windows batch file that is called via the External Tool. I also have the batch open Edge at the login window for the application I am testing. Unfortunately, the next few steps that are to enter the userid, password and then click the Logon button all fail with:
    "Error Message:
    (Edge 138.0.3351.95) User action failed: Edge test framework did not start properly.
    Additional Details:
    No additional details available
    "
    Is something else perhaps needed to get the tests following the opening in Private Mode to also use the new Private Mode browser window?

    Thanks!

  • benken_parasoft
    benken_parasoft Posts: 1,364 ✭✭✭

    Unfortunately,SOAtest does not expose any mechanism to pass extra command line arguments to Edge.

    This is no longer the case! SOAtest 2025.2.0 has some new Java system properties to pass extra command line arguments to browsers:

    com.parasoft.browser.BrowserPropertyOptions.CHROME_ARGUMENTS
    com.parasoft.browser.BrowserPropertyOptions.EDGE_ARGUMENTS
    com.parasoft.browser.BrowserPropertyOptions.FIREFOX_ARGUMENTS
    

    For example, soatest.exe -J-Dcom.parasoft.browser.BrowserPropertyOptions.EDGE_ARGUMENTS=-inprivate

    The CHROME_ARGUMENTS one has been around a long time but the ones for Edge and Firefox were just added as part of the SOAtest 2025.2.0 release.

  • Speedy993
    Speedy993 Posts: 88

    Thanks benken_parasoft. This test is currently in SOATest 2024.2. We are updating our large base of SOATest tests to 2025 now so I will update this one as well. It may be a while as I will be taking some time off in a couple days.