vaishali33
vaishali33

Reputation: 117

PhantomJS load same page multiple times does not work, cannot clear cache

I am trying to use PhantomJS for load testing website, but I am facing this problem, PhantomJS just loads website once, after that it does not actually hit it, I see that there are many discussion for people asking this feature for load testing purpose but looks like its not included in PhnatomJS yet. Did anybody ran into same problem? And what would be best way to overcome this? Also have anybody got success using Selenium WebDriver PhantomJSDriver for doing same? Thank you.

Upvotes: 1

Views: 919

Answers (2)

vaishali33
vaishali33

Reputation: 117

I did by calling driver.executePhantomJs(javascript, "UTF-8") to clear the memory cache. or it can be done as below - driver.executePhantomJS("var page = this; page.clearCookies(); page.clearMemoryCache(); page.close(); return 'DONE';");

Upvotes: 1

aholt
aholt

Reputation: 2971

with PhantomJSDriver, you might be able to use:

driver.manage.deleteAllCookies();

Upvotes: 0

Related Questions