Skip to content

Commit c0d2fca

Browse files
committed
rb - fix bug for finding drivers on windows
1 parent 1dddaef commit c0d2fca

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
@@ -164,7 +164,9 @@ def find_binary(*binary_names)
164164

165165
binary_names.each do |binary_name|
166166
paths.each do |path|
167-
exe = Dir.glob(File.join(path, binary_name)).first
167+
full_path = File.join(path, binary_name)
168+
full_path.tr!('\\', '/') if windows?
169+
exe = Dir.glob(full_path).first
168170
next unless exe
169171
return exe if File.executable?(exe)
170172
end

0 commit comments

Comments
 (0)