Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

Eggplant Functional: Automatically Run Selenium Standalone Server on Windows

DZone's Guide to

Eggplant Functional: Automatically Run Selenium Standalone Server on Windows

This tutorial will show you how quick it is to fully automate the execution of Selenium WebDriver tests through Eggplant Functional.

· DevOps Zone ·
Free Resource

Discover how you can reduce your Kubernetes installation from 22 steps to 1.

To fully automate the execution of Selenium WebDriver tests through Eggplant Functional, it's convenient to set up the Selenium Standalone Server to run automatically every time the system under test boots. If the Standalone Server isn't running, the test will not execute, leading to delays in continuous integration, and false-negatives on regression testing.

From Testplant, Option A: WebDriver installation package, copy the file called RunSeleniumServer.bat to the Startup folder.

Depending on your operating system, the Startup folder may be located at:

  • C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup (Windows 8/10)
  • C:\Documents and Settings\UserName\Start Menu\Programs\Startup (Earlier Windows)

Option B: To manually create a batch file for a Selenium Standalone Server installation

  1. Create a file and type the following line into the file:
    set JAVA_HOME = "<C:\program files\path\to\java="">\bin" "%JAVA_HOME%\java" -jar C:\Path\To\Selenium\selenium-server-standalone-3.6.0.jar
  2. Be sure that the version number for the jar file matches the one that you have installed
  3. Save the file to the Startup folder and name it RunSeleniumServer.bat. Depending on your operating system, the Startup folder may be located at:
    • C:\Users\Username\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup (Windows 8/10)
    • C:\Documents and Settings\UserName\Start Menu\Programs\Startup (Earlier Windows)

Now every time the machine restarts, the batch file will run, launching the Selenium Standalone Server. For more details, see our documentation on the Selenium WebDriver integration.

Download the Kubernetes cheatsheet to learn more about easy it is to run Kubernetes on any infrastructure with Mesosphere DC/OS

Topics:
devops ,selenium ,tutorial ,selenium webdriver

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}