代码之家  ›  专栏  ›  技术社区  ›  Dimi

如何在Selenium中使用Chrome查看flash Cookie

  •  0
  • Dimi  · 技术社区  · 8 年前

    我正在尝试使用硒。NET(C#)从特定URL(在本例中,是kongregate上的一个游戏)中提取Flash Cookie。我知道flash Cookie在我个人使用的浏览器中的物理存储位置。我尝试使用google Chrome目录中的物理位置(google\Chrome\User Data\Default\Pepper Data\Shockwave flash\WritableRoot\SharedObjects)访问flash Cookie,但这对使用selenium的flash Cookie a gather没有影响。如何访问通过selenium实例存储的共享对象文件?

    1 回复  |  直到 8 年前
        1
  •  2
  •   JeffC    8 年前

    尝试加载自定义Chrome配置文件,看看这是否有帮助。这里有一个简单的例子。

    ChromeOptions options = new ChromeOptions();
    options.addArguments("user-data-dir=/path/to/your/custom/profile");
    

    看见 here 了解更多详细信息。