Start Winium Server Automatically and Launch Application

Profile picture for user arilio666

To start using Winium, there are specific steps to be followed.

Step 1: Add Maven Dependency to your POM.xml

Create a maven project and copy-paste the below repository into the pom.xml. Check latest dependency here

<!-- -->

Step 2: Download The Driver.exe File

Download the Winium driver exe ( file from here 

  • Once finished, extract the zip folder and copy the exe file to your desired directory.
  • So commonly, by default, it opens with port 9999, and this port acts as the server.
  • Consider it the bridge.
  • This bridge communicates through the JSON Wireless protocol.

Step 3: Add below code to your class

public class SimpleTest
    DesktopOptions options;
    WiniumDriverService service;
    WiniumDriver driver;

    public void bt()
        //Instantiate Winium Desktop Options
        options = new DesktopOptions();
        // Path of application you want to run and test
        //Path for Winium Desktop Driver
        File driverPath = new File(System.getProperty("user.dir")+File.separator+"drivers"+File.separator+"Winium.Desktop.Driver.exe");
        //Port is 9999, you can change it
        service = new WiniumDriverService.Builder().usingDriverExecutable(driverPath).usingPort(9999).withVerbose(true).withSilent(false).buildDesktopService();
        catch (IOException e)
            System.out.println("Exception while starting WINIUM service");
        driver = new WiniumDriver(service,options);

    public void at()