Class BrowserStorageStateManager

java.lang.Object
com.shaft.gui.browser.internal.BrowserStorageStateManager

public final class BrowserStorageStateManager extends Object
Saves and restores browser cookies, localStorage, and sessionStorage for one WebDriver context.
  • Method Details

    • save

      public static void save(org.openqa.selenium.WebDriver driver, String filePath)
      Saves cookies, localStorage, and sessionStorage to a JSON file.
      Parameters:
      driver - active WebDriver
      filePath - target JSON file
    • load

      public static void load(org.openqa.selenium.WebDriver driver, String filePath)
      Loads cookies, localStorage, and sessionStorage from a JSON file.
      Parameters:
      driver - active WebDriver
      filePath - source JSON file