Class SeleniumCookie


  • public final class SeleniumCookie
    extends java.lang.Object
    Utility class to handles cookies. Offers methods to save and restore cookies for a web domain
    Since:
    2.4.0
    Author:
    Frank Münster
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void read​(org.openqa.selenium.WebDriver driver, java.lang.String backupCookieFile)
      Reads the cookies from the backup file
      static void write​(org.openqa.selenium.WebDriver driver, java.lang.String backupCookieFile)
      Writes the cookies in the backup file
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • read

        public static void read​(org.openqa.selenium.WebDriver driver,
                                java.lang.String backupCookieFile)
        Reads the cookies from the backup file
        Parameters:
        driver - Selenium WebDriver to add cookies to
        backupCookieFile - the backup file name for this bank
        Throws:
        ApplicationExceptionin - case the cookies could not be restored
      • write

        public static void write​(org.openqa.selenium.WebDriver driver,
                                 java.lang.String backupCookieFile)
                          throws de.willuhn.util.ApplicationException
        Writes the cookies in the backup file
        Parameters:
        driver - Seleniuem WebDriver to get the cookies from
        backupCookieFile - the backup file name for this bank
        Throws:
        de.willuhn.util.ApplicationException - in case the cookies could not be stored