QTP Web extensibilty toolkit and ajax

I am trying to test using QTP a web application that uses ajax4jsf to implement ajax functions. QTP cannot recognize when ajax ended. I read that the network extension toolkit provided by QTP 9.5 and QTP 10 is the solution to my problem. However, I can’t understand how this can help me: I need to know the readiness state of the httpRequest object and continue the test when the status is “completed”. But I don’t know how to get to httpRequest from web extensibility tools. Any help would be appreciated.

+5
source share
3 answers

Thank you for your responses.

QTP Extensibilty: A4j , ajax ( ). Jscript ajax (, webButton):
1. globalVariable 0
2. onafterajax:

_elem.ownerDocument.parentWindow.A4J.AJAX.AddListener({
        onafterajax: function(req, event, data) {
            globalVariable = 1;
        }
    });
  1. - :

    while (globalVariable != 1) {   
        _util.Wait(250);
    }
    

, , , ajax globalVariable, while . , , .

, QTP 10 _util.wait, QTP 9.5 - . , . , Jscript, .

+2

- AJAX, .

  • QTP GUI Windows Handle. , , GUI. XmlHttpRequest, . - GUI. . "..." /. . /.

  • , QTP, . , GUI ( ) AJAX.

  • , DOM , GUI, XmlHttpRequest .

,

+2

All Articles