jeudi 26 avril 2018

Trying to programmatically track network requests in automated testing with PhantomJS, WebdriverIO, Mocha/Selenium stack

I am trying to utilize PhantomJS with WebdriverIO on a mocha/selenium/nodeJS stack to track network requests in a test, analyze them for specific ones, and pass back a result. I've tried numerous methods to do so - I'm able to get PhantomJS to run with WDIO successfully but I see no method to be able to tell PhantomJS to do what it describes in it's own documentation here http://phantomjs.org/network-monitoring.html

I can get the network tracking to work when running phantomJS as a child process in node or running it like a coding language in a terminal so the functionality works. However - it seems PhantomJS only operates as a headless browser for WDIO - similar to what doing chrome headless would achieve.

Would love any suggestions or help in how to pass commands from WDIO to PhantomJS to start network request tracking or any other related suggestions.

Aucun commentaire:

Enregistrer un commentaire