Class EmulatedDeviceProfiles
java.lang.Object
com.shaft.driver.internal.DriverFactory.EmulatedDeviceProfiles
Shared table of emulated-device profiles that SHAFT resolves to explicit device metrics instead
of passing a
deviceName to the browser.
Chromium's built-in DevTools emulated-device list drifts across releases (Chrome 143+ removed
"Pixel 5", SHAFT's long-standing default), and an unknown deviceName fails session
creation with the opaque "entry 0 of 'firstMatch' is invalid". Devices in this table always use
explicit deviceMetrics + user agent, so existing configurations keep working regardless
of the browser's own device list. OptionsManager and MobileTraceMetadata both
read this single table so the emulation options and the recorded trace metadata can never
disagree.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordOne resolved emulated-device profile. -
Method Summary
Modifier and TypeMethodDescriptionstatic StringdriftWarning(String deviceName) Builds the up-front warning logged when an unpinned device name is passed through to the browser, replacing chromedriver's opaque session-creation failure with an actionable hint.Looks up a known emulated-device profile by (case-insensitive) device name.
-
Method Details
-
of
Looks up a known emulated-device profile by (case-insensitive) device name.- Parameters:
deviceName- configured mobileEmulationDeviceName- Returns:
- the pinned profile, or empty when the device is not in the table
-
driftWarning
Builds the up-front warning logged when an unpinned device name is passed through to the browser, replacing chromedriver's opaque session-creation failure with an actionable hint.- Parameters:
deviceName- configured mobileEmulationDeviceName- Returns:
- human-readable warning text
-