File tree Expand file tree Collapse file tree
javascript/node/selenium-webdriver/common Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222 */
2323
2424const { driverLocation } = require ( './seleniumManager' )
25- const fs = require ( 'fs' )
2625
2726/**
2827 * Determines the path of the correct Selenium Manager binary
2928 * @returns {string }
3029 */
3130function getPath ( service , capabilities ) {
3231 try {
33- return pathExists ( service . getExecutable ( ) ) || driverLocation ( capabilities )
32+ return driverLocation ( capabilities )
3433 } catch ( e ) {
3534 throw Error (
3635 `Unable to obtain browser driver.
@@ -40,20 +39,5 @@ function getPath(service, capabilities) {
4039 }
4140}
4241
43- /**
44- * _Synchronously_ attempts to locate the driver executable on the current
45- * system.
46- *
47- * @param {!string } driverPath
48- *
49- * @return {?string } the located executable, or `null`.
50- */
51- function pathExists ( driverPath ) {
52- if ( ! driverPath || ! fs . existsSync ( driverPath ) ) {
53- return null
54- }
55- return driverPath
56- }
57-
5842// PUBLIC API
5943module . exports = { getPath }
You can’t perform that action at this time.
0 commit comments