clear browser cache? PhantomJS 2.1.1 Selenium JAVA
- Which version of PhantomJS are you using? Tip: run
phantomjs --version. - 2.1.1
- What steps will reproduce the problem? The algorithms i run to test: A)
- Open the initial page
- Login.
- Load some page on website.
- Many interactions with the page. interaction with 7 elements, file upload.
- Load the next page for the same interactions ->
Phantomjs crashes at page load with this:
Fatal Windows exception, code 0xc0000005.
PhantomJS has crashed. Please read the bug reporting guide at
<http://phantomjs.org/bug-reporting.html> and file a bug report.
Error communicating with the remote browser. It may have died.
Build info: version: '2.41.0', revision: '3192d8a6c4449dc285928ba024779344f5423c58', time: '2014-03-27 11:29:39'
System info: host: '****-PC', ip: '192.168.1.101', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_71'
Driver info: driver.version: RemoteWebDriver
If i run the same algorithm without a lot of interactions with the pages, it works well: B)
- Open the initial page
- Login.
- Load some page on website.
- skip interactions.
- Load the next page (no interactions)
- Load the next, next,next, etc page_n (no interactions) Work well, no crashes.
So i guess, most probably is that there is much info in the cache after the page interactions, thus it crashes the driver. Tried with
--disk-cache=false
Didn't change anything.
I Found that there was some .clearCache() function implemented before, but i didn't find it in phantomjs 2.1.1 which i use.
- Which operating system are you using? win 7 x64
- Did you use binary PhantomJS or did you compile it from source? last binary
- Please provide any additional information below. Full config:
26-May-2016 12:07:38.781 INFO [http-apr-8080-exec-6] org.openqa.selenium.phantomjs.PhantomJSDriverService.<init> arguments: [--ignore-ssl-errors=true, --ssl-protocol=any, --web-security=false, --load-images=false, --disk-cache=false, --webdriver=39192, --webdriver-logfile=C:\Users\slipo\IdeaProjects\testSpring\tomcat9\bin\phantomjsdriver.log]
26-May-2016 12:07:38.781 INFO [http-apr-8080-exec-6] org.openqa.selenium.phantomjs.PhantomJSDriverService.<init> environment: {}
[INFO - 2016-05-26T05:07:40.206Z] GhostDriver - Main - running on port 39192
[INFO - 2016-05-26T05:07:40.307Z] Session [c54495b0-22ff-11e6-9463-e3a991c1ab65] - page.settings - {"XSSAuditingEnabled":false,"javascriptCanCloseWindows":true,"javascriptCanOpenWindows":true,"javascriptEnabled":true,"loadImages":false,"localToRemoteUrlAccessEnabled":false,"userAgent":"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.108 Safari/537.36","webSecurityEnabled":false}
[INFO - 2016-05-26T05:07:40.307Z] Session [c54495b0-22ff-11e6-9463-e3a991c1ab65] - page.customHeaders: - {"Accept-Language":"en-GB"}
[INFO - 2016-05-26T05:07:40.307Z] Session [c54495b0-22ff-11e6-9463-e3a991c1ab65] - Session.negotiatedCapabilities - {"browserName":"phantomjs","version":"2.1.1","driverName":"ghostdriver","driverVersion":"1.2.0","platform":"windows-7-32bit","javascriptEnabled":true,"takesScreenshot":true,"handlesAlerts":false,"databaseEnabled":false,"locationContextEnabled":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"cssSelectorsEnabled":true,"webStorageEnabled":false,"rotatable":false,"acceptSslCerts":false,"nativeEvents":true,"proxy":{"proxyType":"direct"},"phantomjs.page.settings.resourceTimeout":70000,"phantomjs.page.settings.clearMemoryCaches":true,"phantomjs.page.settings.userAgent":"Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.108 Safari/537.36","phantomjs.page.customHeaders.Accept-Language":"en-GB"}
[INFO - 2016-05-26T05:07:40.308Z] SessionManagerReqHand - _postNewSessionCommand - New Session Created: c54495b0-22ff-11e6-9463-e3a991c1ab65
any help possible with this issue?
Due to our very limited maintenance capacity, we need to prioritize our development focus on other tasks. Therefore, this issue will be automatically closed (see #15395 for more details). In the future, if we see the need to attend to this issue again, then it will be reopened. Thank you for your contribution!