File tree 1 file changed +6
-7
lines changed
rb/lib/selenium/webdriver/common
1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ def driver_path(driver_name)
39
39
raise Error ::WebDriverError , msg
40
40
end
41
41
42
- location = run ( "#{ binary } --driver #{ driver_name } " ) . split ( " \t " ) . last . strip
42
+ location = run ( "#{ binary } --driver #{ driver_name } " )
43
43
WebDriver . logger . debug ( "Driver found at #{ location } " )
44
44
Platform . assert_executable location
45
45
@@ -73,13 +73,12 @@ def binary
73
73
def run ( command )
74
74
WebDriver . logger . debug ( "Executing Process #{ command } " )
75
75
76
- stdout , stderr , _status = Open3 . capture3 ( command )
77
- return stdout if stdout . match? ( /^INFO\t / )
76
+ stdout , stderr , status = Open3 . capture3 ( command )
77
+ if status . exitstatus . positive?
78
+ raise Error ::WebDriverError , "Unsuccessful command executed: #{ command } \n #{ stdout } #{ stderr } "
79
+ end
78
80
79
- message = stdout . empty? ? stderr . gsub ( "\n \n " , "\n " ) : stdout
80
- raise Error ::WebDriverError , "\n #{ message } "
81
- rescue StandardError => e
82
- raise Error ::WebDriverError , "Unsuccessful command executed: #{ command } ; #{ e . message } "
81
+ stdout . gsub ( "INFO\t " , '' ) . strip
83
82
end
84
83
end
85
84
end # SeleniumManager
You can’t perform that action at this time.
0 commit comments