MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / createSession

Method createSession

javascript/selenium-webdriver/ie.js:445–463  ·  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

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

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