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

Method createSession

javascript/selenium-webdriver/safari.js:131–146  ·  view source on GitHub ↗

* Creates a new Safari session. * * @param {(Options|Capabilities)=} options The configuration options. * @return {!Driver} A new driver instance.

(options)

Source from the content-addressed store, hash-verified

129 * @return {!Driver} A new driver instance.
130 */
131 static createSession(options) {
132 let caps = options || new Options()
133
134 let exe
135 if (useTechnologyPreview(caps.get(OPTIONS_CAPABILITY_KEY))) {
136 exe = SAFARIDRIVER_TECHNOLOGY_PREVIEW_EXE
137 }
138
139 let service = new ServiceBuilder(exe).build()
140 if (!service.getExecutable()) {
141 service.setExecutable(getBinaryPaths(caps).driverPath)
142 }
143 let executor = new http.Executor(service.start().then((url) => new http.HttpClient(url)))
144
145 return /** @type {!Driver} */ (super.createSession(executor, caps, () => service.kill()))
146 }
147}
148
149// Public API

Callers

nothing calls this directly

Calls 8

useTechnologyPreviewFunction · 0.85
getBinaryPathsFunction · 0.85
getMethod · 0.65
startMethod · 0.65
buildMethod · 0.45
getExecutableMethod · 0.45
setExecutableMethod · 0.45
killMethod · 0.45

Tested by

no test coverage detected