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

Function configureExecutor

javascript/selenium-webdriver/chromium.js:124–158  ·  view source on GitHub ↗

* Configures the given executor with Chromium-specific commands. * @param {!http.Executor} executor the executor to configure.

(executor, vendorPrefix)

Source from the content-addressed store, hash-verified

122 * @param {!http.Executor} executor the executor to configure.
123 */
124function configureExecutor(executor, vendorPrefix) {
125 executor.defineCommand(Command.LAUNCH_APP, 'POST', '/session/:sessionId/chromium/launch_app')
126 executor.defineCommand(Command.GET_NETWORK_CONDITIONS, 'GET', '/session/:sessionId/chromium/network_conditions')
127 executor.defineCommand(Command.SET_NETWORK_CONDITIONS, 'POST', '/session/:sessionId/chromium/network_conditions')
128 executor.defineCommand(Command.DELETE_NETWORK_CONDITIONS, 'DELETE', '/session/:sessionId/chromium/network_conditions')
129 executor.defineCommand(Command.SEND_DEVTOOLS_COMMAND, 'POST', '/session/:sessionId/chromium/send_command')
130 executor.defineCommand(
131 Command.SEND_AND_GET_DEVTOOLS_COMMAND,
132 'POST',
133 '/session/:sessionId/chromium/send_command_and_get_result',
134 )
135 executor.defineCommand(Command.SET_PERMISSION, 'POST', '/session/:sessionId/permissions')
136 executor.defineCommand(Command.GET_CAST_SINKS, 'GET', `/session/:sessionId/${vendorPrefix}/cast/get_sinks`)
137 executor.defineCommand(
138 Command.SET_CAST_SINK_TO_USE,
139 'POST',
140 `/session/:sessionId/${vendorPrefix}/cast/set_sink_to_use`,
141 )
142 executor.defineCommand(
143 Command.START_CAST_DESKTOP_MIRRORING,
144 'POST',
145 `/session/:sessionId/${vendorPrefix}/cast/start_desktop_mirroring`,
146 )
147 executor.defineCommand(
148 Command.START_CAST_TAB_MIRRORING,
149 'POST',
150 `/session/:sessionId/${vendorPrefix}/cast/start_tab_mirroring`,
151 )
152 executor.defineCommand(
153 Command.GET_CAST_ISSUE_MESSAGE,
154 'GET',
155 `/session/:sessionId/${vendorPrefix}/cast/get_issue_message`,
156 )
157 executor.defineCommand(Command.STOP_CASTING, 'POST', `/session/:sessionId/${vendorPrefix}/cast/stop_casting`)
158}
159
160/**
161 * Creates {@link selenium-webdriver/remote.DriverService} instances that manage

Callers 2

createExecutorFunction · 0.70
createSessionMethod · 0.70

Calls 1

defineCommandMethod · 0.65

Tested by

no test coverage detected