* 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)
| 31 | * and browser location |
| 32 | */ |
| 33 | function 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 | |
| 47 | function getArgs(options) { |
| 48 | let args = ['--browser', options.getBrowserName(), '--language-binding', 'javascript', '--output', 'json'] |
no test coverage detected