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

Method createSession

javascript/selenium-webdriver/safari.js:132–148  ·  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

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

Callers

nothing calls this directly

Calls 8

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

Tested by

no test coverage detected