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

Function getBinaryPaths

javascript/selenium-webdriver/common/driverFinder.js:33–45  ·  view source on GitHub ↗

* Determines the path of the correct Selenium Manager binary * @param {Capabilities} capabilities browser options to fetch the driver * @returns {{browserPath: string, driverPath: string}} path of the driver * and browser location

(capabilities)

Source from the content-addressed store, hash-verified

31 * and browser location
32 */
33function getBinaryPaths(capabilities) {
34 try {
35 const args = getArgs(capabilities)
36 return binaryPaths(args)
37 } catch (e) {
38 throw new Error(
39 `Unable to obtain browser driver.
40 For more information on how to install drivers see
41 https://www.selenium.dev/documentation/webdriver/troubleshooting/errors/driver_location/. ${e}`,
42 { cause: e },
43 )
44 }
45}
46
47function getArgs(options) {
48 let args = ['--browser', options.getBrowserName(), '--language-binding', 'javascript', '--output', 'json']

Callers 7

createSessionMethod · 0.85
createSessionMethod · 0.85
createSessionMethod · 0.85
createSessionMethod · 0.85
service_test.jsFile · 0.85
service_test.jsFile · 0.85
getAvailableBrowsersFunction · 0.85

Calls 2

getArgsFunction · 0.85
binaryPathsFunction · 0.85

Tested by

no test coverage detected