Saturday, 29 September 2018

Equivalent of jQuery.active in javascript Selenium Web Driver

I am using selenium webdirver to interact with some website.
If the website is using jQuery we can get the pending ajax request by using jQuery.active.

 JavascriptExecutor jsx = (JavascriptExecutor) driver;

Int totAjaxRequest = (Int)jsx.executeScript("jQuery.active");

Int totAjaxRequest = (Int)jsx.executeScript("return jQuery.active");

In case if the website is not using jQuery how can we count the number of XMLHttpRequest request.



from Equivalent of jQuery.active in javascript Selenium Web Driver

No comments:

Post a Comment