Skip to content

It's time to bring Start Server back #100

@adwu73

Description

@adwu73

In latest webdriver version, a IEDriverServer.exe can be started seperately, and you have to register a call back to kill the process if the test fail. It seems that we can bring Start Server keyword back to allow the configuration of the IEDriverServer.exe and also register the call back. Here is the example java code:

System.setProperty("webdriver.ie.driver",
            "C:\\IEDriver\\IEDriverServer.exe");

    try {
        service = new InternetExplorerDriverService.Builder()
                .usingAnyFreePort()
                .withLogFile(new File("C:\\IEDriver\\iedriver.log"))
                .withLogLevel(InternetExplorerDriverLogLevel.INFO).build();
        service.start();
    } catch (IOException e) {
        throw Throwables.propagate(e);
    }

    Runtime.getRuntime().addShutdownHook(new Thread() {
        @Override
        public void run() {
            service.stop();
        }
    });

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions