Forum Discussion

nastester's avatar
Regular Contributor
2 months ago

Parallel test execution using multiple local headless browsers

Is the title of this post possible?

I am trying to run two scripts in parallel using local headless browsers:


When I try running, User1Login passes but User2Login fails with the error "Unable to find the object Sys.Browser("Remote")". Switching the order, User2Login passes but User1Login fails (they are the same script but I am passing in a different user).

What am I doing wrong? Is what I am trying to do even possible? 
It seems like my second script can't use the same Sys.Browser("Remote").  Can I add something in parameters?

5 Replies

    • nastester's avatar
      Regular Contributor

      This is a snippet from the script.

      I am launching a remote browser and then assigning it to a variable called browser which i use for the page objects:

      function headlessLogin(env, user) {
        //Setup and launch headless browser
        var url = env;
        var server = "localhost";
        var capabilities = {
          "browserName": ProjectSuite.Variables.browser,
          "screenResolution": "1920x1080"
        Browsers.RemoteItem(server, capabilities).Run(url);
        var browser = Sys.Browser("Remote");
        //Enter User
        var page = browser.Page("*");