Skip to content

Commit

Permalink
Add Edge finding on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
twalpole committed Jun 11, 2019
1 parent 0f9a0df commit bd116d9
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions lib/webdrivers/edge_finder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,16 @@ def version
end

def win_location
return Selenium::WebDriver::Edge.path unless Selenium::WebDriver::Edge.path.nil?
envs = %w[LOCALAPPDATA PROGRAMFILES PROGRAMFILES(X86)]
directories = ['\\Microsoft\\Edge SxS\\Application', '\\Microsoft\\Edge Dev\\Application']
file = 'msedge.exe'

# TODO: Need to figure out what these are
raise 'Not yet implemented'
# envs = %w[LOCALAPPDATA PROGRAMFILES PROGRAMFILES(X86)]
# directories = ['\\Google\\Chrome\\Application', '\\Chromium\\Application']
# file = 'chrome.exe'
#
# directories.each do |dir|
# envs.each do |root|
# option = "#{ENV[root]}\\#{dir}\\#{file}"
# return option if File.exist?(option)
# end
# end
directories.each do |dir|
envs.each do |root|
option = "#{ENV[root]}\\#{dir}\\#{file}"
return option if File.exist?(option)
end
end
end

def mac_location
Expand Down

0 comments on commit bd116d9

Please sign in to comment.