Registration of xhr protocols when performing e2e tests with a protractor

I do e2e tests for an application whose interface is written in AngularJS, and these tests usually include filling out forms, sending data to the backend, and then refreshing the page and keeping track of the data being saved. Tests are recorded in the protractor.

One of these tests fails, inconsistently and for no apparent reason, so I would like to get as much information as possible for debugging. Therefore, I was interested to know whether it is possible to register xhr POST requests that my external interface sends to the backend during the test in question, or even better, can the data and data sent by the browser protractor? Perhaps using an object browser? I am googled, and googled, but to no avail.

Yes, I understand that e2e tests are for interface only and that ajax requests are too low for such tests. Yes, it would probably delete the entire backend, and just testing the interface would be much better. But please humor me. Is it possible to get information about what is placed by the browser on the server during e2e tests using a protractor?

+4
source share
1 answer

Protractor API- webdriverjs "" , - , Selenium webdriver. . : http://docs.seleniumhq.org/docs/03_webdriver.jsp#selenium-webdriver-api-commands-and-operations

API- ( cookie, ) Protractor WebdriverJS JavaScript (, DOM). , , .

, , / ( , ). , $http, (, , ). ​​

+3

All Articles