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

Method get_platform_label

rust/src/firefox.rs:398–424  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

396 }
397
398 fn get_platform_label(&self) -> &str {
399 let driver_version = self.get_driver_version();
400 let os = self.get_os();
401 let arch = self.get_arch();
402 let minor_driver_version = self
403 .get_minor_version(driver_version)
404 .unwrap_or_default()
405 .parse::<i32>()
406 .unwrap_or_default();
407 if WINDOWS.is(os) {
408 if X32.is(arch) {
409 "win32"
410 } else if ARM64.is(arch) && minor_driver_version > 31 {
411 "win-arm64"
412 } else {
413 "win64"
414 }
415 } else if MACOS.is(os) {
416 if ARM64.is(arch) { "mac-arm64" } else { "mac64" }
417 } else if X32.is(arch) {
418 "linux32"
419 } else if ARM64.is(arch) && minor_driver_version > 31 {
420 "linux-arm64"
421 } else {
422 "linux64"
423 }
424 }
425
426 fn request_latest_browser_version_from_online(
427 &mut self,

Callers 1

Calls 5

get_driver_versionMethod · 0.80
get_osMethod · 0.80
get_archMethod · 0.80
get_minor_versionMethod · 0.80
isMethod · 0.65

Tested by

no test coverage detected