MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / createSession

Method createSession

javascript/selenium-webdriver/ie.js:446–465  ·  view source on GitHub ↗

* 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)

Source from the content-addressed store, hash-verified

444 * @return {!Driver} A new driver instance.
445 */
446 static createSession(options, opt_service) {
447 options = options || new Options()
448
449 let service
450
451 if (opt_service instanceof remote.DriverService) {
452 service = opt_service
453 } else {
454 service = createServiceFromCapabilities(options)
455 }
456 if (!service.getExecutable()) {
457 service.setExecutable(getBinaryPaths(options).driverPath)
458 }
459
460 let client = service.start().then((url) => new http.HttpClient(url))
461 let executor = new http.Executor(client)
462 executor[Symbols.localDriverService] = true
463
464 return /** @type {!Driver} */ (super.createSession(executor, options, () => service.kill()))
465 }
466
467 /**
468 * This function is a no-op as file detectors are not supported by this

Callers

nothing calls this directly

Calls 6

getBinaryPathsFunction · 0.85
startMethod · 0.65
getExecutableMethod · 0.45
setExecutableMethod · 0.45
killMethod · 0.45

Tested by

no test coverage detected