MCPcopy Create free account
hub / github.com/SeleniumHQ/selenium / get_browser_path_map

Method get_browser_path_map

rust/src/edge.rs:147–195  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

145 }
146
147 fn get_browser_path_map(&self) -> HashMap<BrowserPath, &str> {
148 if self.is_webview2() {
149 HashMap::from([(
150 BrowserPath::new(WINDOWS, STABLE),
151 r"Microsoft\EdgeWebView\Application",
152 )])
153 } else {
154 HashMap::from([
155 (
156 BrowserPath::new(WINDOWS, STABLE),
157 r"Microsoft\Edge\Application\msedge.exe",
158 ),
159 (
160 BrowserPath::new(WINDOWS, BETA),
161 r"Microsoft\Edge Beta\Application\msedge.exe",
162 ),
163 (
164 BrowserPath::new(WINDOWS, DEV),
165 r"Microsoft\Edge Dev\Application\msedge.exe",
166 ),
167 (
168 BrowserPath::new(WINDOWS, NIGHTLY),
169 r"Microsoft\Edge SxS\Application\msedge.exe",
170 ),
171 (
172 BrowserPath::new(MACOS, STABLE),
173 "/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",
174 ),
175 (
176 BrowserPath::new(MACOS, BETA),
177 "/Applications/Microsoft Edge Beta.app/Contents/MacOS/Microsoft Edge Beta",
178 ),
179 (
180 BrowserPath::new(MACOS, DEV),
181 "/Applications/Microsoft Edge Dev.app/Contents/MacOS/Microsoft Edge Dev",
182 ),
183 (
184 BrowserPath::new(MACOS, NIGHTLY),
185 "/Applications/Microsoft Edge Canary.app/Contents/MacOS/Microsoft Edge Canary",
186 ),
187 (BrowserPath::new(LINUX, STABLE), "/usr/bin/microsoft-edge"),
188 (
189 BrowserPath::new(LINUX, BETA),
190 "/usr/bin/microsoft-edge-beta",
191 ),
192 (BrowserPath::new(LINUX, DEV), "/usr/bin/microsoft-edge-dev"),
193 ])
194 }
195 }
196
197 fn discover_browser_version(&mut self) -> Result<Option<String>, Error> {
198 let (reg_key, reg_version_arg, cmd_version_arg) = if self.is_webview2() {

Callers 1

Calls 1

is_webview2Method · 0.80

Tested by

no test coverage detected