File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
rb/lib/selenium/webdriver/common Expand file tree Collapse file tree 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)
3939 raise Error ::WebDriverError , msg
4040 end
4141
42- location = run ( "#{ binary } --driver #{ driver_name } " ) . split ( " \t " ) . last . strip
42+ location = run ( "#{ binary } --driver #{ driver_name } " )
4343 WebDriver . logger . debug ( "Driver found at #{ location } " )
4444 Platform . assert_executable location
4545
@@ -73,13 +73,12 @@ def binary
7373 def run ( command )
7474 WebDriver . logger . debug ( "Executing Process #{ command } " )
7575
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
7880
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
8382 end
8483 end
8584 end # SeleniumManager
You can’t perform that action at this time.
0 commit comments