How to enable Cookie In Phantomjs?

Shubham Katiyar
Shubham Katiyar

Posted On: May 26, 2021

 

You can follow the following steps to enable Cookie In Phantomjs:

  • case BrowserType.PhantomJS:
  • var service = PhantomJSDriverService.CreateDefaultService(Path.Combine(_rootPath, @"Packages\"));
  • var cookieFilePath=Path.Combine(_rootPath, @"Packages\cookie.txt");
  • if (!File.Exists(cookieFilePath))
  • File.Create(cookieFilePath);

    Related Questions

    Please Login or Register to leave a response.

    Related Questions

    Phantomjs Interview Questions

    What is Phantomjs?

    PhantomJS is known as a web browser without a graphical user interface. PhantomJS is a headless WebKit and web browser scriptable with a JavaScript API. Its native support for various web standards su...

    Phantomjs Interview Questions

    Enlist some difference between puppeteer and phantomjs?

    PhantomJS is a headless WebKit scriptable with JavaScript which is used for web-related development workflow. Whereas Puppeteer is detailed as "Headless Chrome Node API". Basically, it is a Node libra...

    Phantomjs Interview Questions

    List major features of Phantomjs?

    The major features of Phantomjs are listed below:Page Automation Screen Capture Headless Testing Network Monitoring Ability to monitor the network connection ...