Class MobileTraceMetadata
java.lang.Object
com.shaft.tools.io.internal.MobileTraceMetadata
Collects mobile and mobile-emulation metadata for SHAFT trace events.
-
Method Summary
Modifier and TypeMethodDescriptionmcpDeviceProfile(String browserName) Converts Selenium trace metadata into the unprefixed MCP response shape.mcpDeviceProfile(org.openqa.selenium.WebDriver driver, String browserName) Converts Selenium trace metadata into the unprefixed MCP response shape.mobileMetadata(org.openqa.selenium.WebDriver driver, boolean includeNativeSource) Builds Appium/mobile metadata for an action trace event.seleniumMobileEmulationProfile(String browserName) Builds the Selenium Chrome/Edge mobile-emulation profile from current SHAFT properties.seleniumMobileEmulationProfile(org.openqa.selenium.WebDriver driver, String browserName) Builds the Selenium mobile-emulation profile and enriches it with live browser values when available.
-
Method Details
-
mobileMetadata
public static Map<String,String> mobileMetadata(org.openqa.selenium.WebDriver driver, boolean includeNativeSource) Builds Appium/mobile metadata for an action trace event.- Parameters:
driver- active WebDriver sessionincludeNativeSource- whether to include a bounded native source excerpt when enabled- Returns:
- trace metadata; empty when the driver/properties do not describe a mobile session
-
seleniumMobileEmulationProfile
-
seleniumMobileEmulationProfile
public static Map<String,String> seleniumMobileEmulationProfile(org.openqa.selenium.WebDriver driver, String browserName) Builds the Selenium mobile-emulation profile and enriches it with live browser values when available.- Parameters:
driver- active emulated browser sessionbrowserName- active browser name- Returns:
- trace metadata using
deviceProfile.*keys
-
mcpDeviceProfile
-
mcpDeviceProfile
public static Map<String,String> mcpDeviceProfile(org.openqa.selenium.WebDriver driver, String browserName) Converts Selenium trace metadata into the unprefixed MCP response shape.- Parameters:
driver- active emulated browser sessionbrowserName- active browser name- Returns:
- device profile details for MCP session responses
-