Skip to content

It's time to bring Start Server back #100

Closed

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();
        }
    });

Activity

  1. ombre42 commented on Dec 28, 2013

    @ombre42
    Contributor

    With the keyword Create Webdriver that will be in 1.5, you will be able to pass parameters to the ie webdriver's init. This will allow you to set the log level of IEDriverServer, specify exe location, and more. The webdriver init has all the parameters for the service and creates a service instance so there is no need to construct your own service.See the docstring for Create Webdriver for an example of starting IEDriverServer with specific parameters.

    Stopping the server is taken care of by Close All Browsers or Close Browser, so use one of them as a teardown or inside a user teardown keyword.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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