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

918 views Asked by At

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.

2

There are 2 answers

0
vaishali33 On BEST ANSWER

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';");

0
aholt On

with PhantomJSDriver, you might be able to use:

driver.manage.deleteAllCookies();