SessionBox Workstation, our standalone browser solution now supports advanced automation through Selenium. Selenium is an automation framework, which is a de facto standard for web automation. It is widely supported in browsers, has great tooling, and now we've integrated it into Workstation as well.
This is an experimental feature as of yet, so please help us with your feedback about the feature.

Getting started

  1. Install a development IDE. If you don't have any other preference, we suggest Visual Studio Code, as it is free, really convenient to use and has amazing community support, that helps all levels of developers from beginners, to professionals.
    This IDE will provide you the tools to develop code, necessary for utilizing our automation solution.
  2. If you don't want to write all Selenium actions by hand, we strongly encourage you to use the Selenium IDE. Install the Selenium IDE extension into your Chrome browser. In this extension, you will be able to record the actions that you want to automate, then export the generated code in your selected language - that you can open in Visual Studio Code, and run any time again.
  3. Start Chrome, then open the Selenium IDE extension. Create a new project, and add a new test. Provide the url that you want to automate, then start recording the actions you want to repeat later. When you are done, stop recording, save the test, then export the test. We suggest using Javascript, but feel free to choose any other language if that's more convenient for you.
  4. To simplify organizing and executing your workflow later, create a folder for the files, eg. '/WorkstationAutomation'. This will host your project. To separate your executable tests, also create a subfolder for the code files: '/WorkstationAutomation/test'. Copy your script files into this folder (that you exported previously). Please note that Javascript's mocha framework (that we will use for executing the scripts) expects the scripts in a test folder by default.
  5. Now let's install the dependencies, needed for executing the scripts. You will need "node" to run Javascript scripts. After installing node, you will able to install libraries with "npm", node's package manager. Install "mocha", that will execute our automation scripts - that are basically web testing scripts.
  6. Now you should be able to run the scripts with the "mocha" command from the project's root folder. Still, you need some steps to configure the scripts to use Workstation instead of Chrome.
  7. Enable Automation inside Workstation. To do this, open up the Settings page, turn on the "Enable automation" feature. You will need to use your unique Selenium API key later, so copy it for later use.
  8. To use Workstation with Selenium, you will need to select a Workstation session that will provide context for the automated process. This means that the flow will use the fingerprints, proxy and all other settings that belong to this stored session. To get the selected session's id, just open the selected session's settings and copy the sessionID from the top of the settings page.
  9. Open the exported test (in our case the Javascript version was exported) in Visual Studio Code. Modify the "beforeEach" function to configure the test to use Workstation for executing the automated workflow:
beforeEach(async function() {
  const capabilities = new Capabilities();
  capabilities.setBrowserName('sessionbox')
      .setPlatform({
        automationKey: '{paste your Selenium API key here}',
        sessionId: '{paste the selected session's id here}'
      });
  driver = new Builder()
      .withCapabilities(capabilities)
      .usingServer('http://127.0.0.1:3000/wd')
      .build();
});

After all these steps, try once again running the "mocha" from the project's root ('/WorkstationAutomation'). You should now see the script opening up Workstation then running your automated workflow. So congratz and happy coding!
Please share your experience with us and any improvement ideas are welcome.

Did this answer your question?