9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# File 'lib/panda/core/testing/support/system/chrome_path.rb', line 9
def self.resolve
@resolved ||= begin
candidates = [
"/usr/bin/chromium",
"/usr/bin/chromium-browser",
"/usr/bin/google-chrome",
"/opt/google/chrome/google-chrome",
"/opt/google/chrome/chrome",
"/opt/homebrew/bin/chromium",
"/usr/local/bin/chromium",
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
"/Applications/Chromium.app/Contents/MacOS/Chromium",
"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge"
]
candidates.find { |path| File.executable?(path) } ||
raise("Could not find a Chrome/Chromium binary on this system")
end
end
|