there is or not an active ajax request

4 posts, 0 answers
  1. Ivan
    Ivan avatar
    18 posts
    Member since:
    Jul 2016

    Posted 17 Oct 2017 Link to this post

    Hi,
    I need to know there is or not active Ajax request at the current moment.
    The active request I mean the request which has not been back yet from a backend?

    Is there a method to do that?

    Thanks

  2. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 18 Oct 2017 Link to this post

    Hello Ivan,

    Thank you for reaching us out. 

    There isn't exactly a method that will check if currently there is an active ajax call. Though you could use the Browser.WaitForAjax Method which will hold the execution until the active request is finished. 

    Manager.ActiveBrowser.WiatForAjax(timeout);

    I hope this will be helpful to you and you will manage to implement it for your scenario. Thanks!

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Ivan
    Ivan avatar
    18 posts
    Member since:
    Jul 2016

    Posted 18 Oct 2017 in reply to Elena Tsvetkova Link to this post

    Hello Elena,

    Thank you for the answer.

    I know about Wait For Ajax but I need a method waits for an active ajax call is sent, not finished.

  4. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    938 posts

    Posted 23 Oct 2017 Link to this post

    Hi Ivan,

    Thanks for getting back. Unfortunately I have to admit there is no such method provided by Test Studio. 

    Though I have searched the web and found a forum thread which might contain what you need to handle the scenario. Please find it here and double check the second reply of Cody Gibson. I hope this will something you could apply that within your code. 

    Thank you for your understanding! 

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top