I am using phantom js to test accessing a webpage, this runs approximatley 350 times in the space of about half an hour. I am then running webalizer against the server to test page accesses.
My phantom js clients are inside 1 instance of phantom js so it basically works in the sense that once one client has opened the web page kick off the next client, all with individual IP addresses and MAC addresses throughout.
However what I am finding in webalizer is that while I get 350 hits to the server I am only getting 1 hit per instance of phantomjs I run on some css files and others. So I have come up with the idea of it caching clients together.
I have attempted running --max-disk-cache-size=0 when calling the phantom js instance but still see it acting the same.
Has anyone experienced the same before?
PhantomJS is a discontinued headless browser used for automating web page interaction. PhantomJS provides a JavaScript API enabling automated navigation, screenshots, user behavior and assertions making it a common tool used to run browser-based unit tests in a headless system like a continuous integration environment.
For WindowsDownload the zip file, unpack it and you will get an executable phantom.exe. Set the PATH environment variable to the path of phantom.exe file. Open a new command prompt and type phantomjs –v. It should give you the current version of PhantomJS that is running.
Go to the “bin” folder and check phantomjs.exe file. If you are using it on a Windows OS, then you can set the path variable under the environment variable for fast access through command prompt. The command to run the PhantomJS program: C:\> phantomjs [options] file.
Run page.clearMemoryCache();
before page.open
can clean cache.
It metioned in this issue, and it works fine in PhantomJS 2.0.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With