2

I have tried multiple options like jQuery.active, $ active and window.openHTTPs but are returning no pending requests in case of pending xhr request.

So is there a way using JavaScript to identify a total number of pending xhr request.

In browser tool I can see that xhr request is generated by dojo.js, need a generic JavaScript way to get number of pending xhr requests

Basically, I want to execute a JavaScript using Selenium which will wait till all pending requests became 0

Abhinav Garg
  • 1,642
  • 3
  • 22
  • 41
  • 1
    Possible duplicate of [How to check if HTTP requests are open in browser?](https://stackoverflow.com/questions/9267451/how-to-check-if-http-requests-are-open-in-browser) – barbsan Oct 05 '18 at 12:34
  • Well I missed the selenium part, In the answer someone has mentioned that the script is not working with selenium – Abhinav Garg Oct 05 '18 at 12:52
  • If you're testing dojo app, `jQuery.active` doesn't work, because dojotoolkit doesn't use jQuery. Propably you could write wrapper for `dojo/request/xhr` with implemented counter. – barbsan Oct 05 '18 at 13:17
  • @barbsan thanks but is there any generic way to do so which is not app specific, I mean a generic JavaScript call? – Abhinav Garg Oct 05 '18 at 13:34

0 Answers0