* Creates a new session for Microsoft's Internet Explorer. * * @param {(Capabilities|Options)=} options The configuration options. * @param {(remote.DriverService)=} opt_service The `DriverService` to use * to start the IEDriverServer in a child process, optionally. * @return {!Driv
(options, opt_service)
| 443 | * @return {!Driver} A new driver instance. |
| 444 | */ |
| 445 | static createSession(options, opt_service) { |
| 446 | options = options || new Options() |
| 447 | |
| 448 | let service |
| 449 | |
| 450 | if (opt_service instanceof remote.DriverService) { |
| 451 | service = opt_service |
| 452 | } else { |
| 453 | service = createServiceFromCapabilities(options) |
| 454 | } |
| 455 | if (!service.getExecutable()) { |
| 456 | service.setExecutable(getBinaryPaths(options).driverPath) |
| 457 | } |
| 458 | |
| 459 | let client = service.start().then((url) => new http.HttpClient(url)) |
| 460 | let executor = new http.Executor(client) |
| 461 | |
| 462 | return /** @type {!Driver} */ (super.createSession(executor, options, () => service.kill())) |
| 463 | } |
| 464 | |
| 465 | /** |
| 466 | * This function is a no-op as file detectors are not supported by this |
nothing calls this directly
no test coverage detected