Class MobileTraceMetadata

java.lang.Object
com.shaft.tools.io.internal.MobileTraceMetadata

public final class MobileTraceMetadata extends Object
Collects mobile and mobile-emulation metadata for SHAFT trace events.
  • 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 session
      includeNativeSource - 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

      public static Map<String,String> seleniumMobileEmulationProfile(String browserName)
      Builds the Selenium Chrome/Edge mobile-emulation profile from current SHAFT properties.
      Parameters:
      browserName - active browser name
      Returns:
      trace metadata using deviceProfile.* keys
    • 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 session
      browserName - active browser name
      Returns:
      trace metadata using deviceProfile.* keys
    • mcpDeviceProfile

      public static Map<String,String> mcpDeviceProfile(String browserName)
      Converts Selenium trace metadata into the unprefixed MCP response shape.
      Parameters:
      browserName - active browser name
      Returns:
      device profile details for MCP session responses
    • 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 session
      browserName - active browser name
      Returns:
      device profile details for MCP session responses