Skip to content

Commit 63673ea

Browse files
committed
rb - fix bug for finding drivers on windows
(cherry picked from commit c0d2fca)
1 parent 31204aa commit 63673ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rb/lib/selenium/webdriver/common/platform.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,9 @@ def find_binary(*binary_names)
168168

169169
binary_names.each do |binary_name|
170170
paths.each do |path|
171-
exe = Dir.glob(File.join(path, binary_name)).first
171+
full_path = File.join(path, binary_name)
172+
full_path.tr!('\\', '/') if windows?
173+
exe = Dir.glob(full_path).first
172174
next unless exe
173175
return exe if File.executable?(exe)
174176
end

0 commit comments

Comments
 (0)