rwestbury
11 years agoContributor
Possible to detect HTTP POST and HTTP GET requests from the Browser?
Hello all,
We are in need of something like the following:
Sys.Browser.Page.MyButton.Click()
httpPostRequest = waitForHttpPostRequest(maxWaitTime = 10ms)
if httpPostRequest then waitForHttpGetRequest(maxWaitTime = 120000ms)
waitForPageToLoad()
The reason we need this is because, after the Click(), in theory an HTTP POST request should either be sent immediately, or never, as a result of the Click(). Therefore if it's not sent within 10ms return False, otherwise return True as soon as an HTTP POST request is detected. If an HTTP POST request is detected, then wait for an HTTP GET request for up to 2 minutes. An HTTP GET request should be sent within a few seconds, so now the page is definitely loading, therefore it's now safe to wait for the page to finish loading.
Fiddler has the ability to monitor such things. I'm hoping TestComplete has something built in for this to help us deal with these random delays that occur between Click() and the page actually loading.
Thanks,
Robert
We are in need of something like the following:
Sys.Browser.Page.MyButton.Click()
httpPostRequest = waitForHttpPostRequest(maxWaitTime = 10ms)
if httpPostRequest then waitForHttpGetRequest(maxWaitTime = 120000ms)
waitForPageToLoad()
The reason we need this is because, after the Click(), in theory an HTTP POST request should either be sent immediately, or never, as a result of the Click(). Therefore if it's not sent within 10ms return False, otherwise return True as soon as an HTTP POST request is detected. If an HTTP POST request is detected, then wait for an HTTP GET request for up to 2 minutes. An HTTP GET request should be sent within a few seconds, so now the page is definitely loading, therefore it's now safe to wait for the page to finish loading.
Fiddler has the ability to monitor such things. I'm hoping TestComplete has something built in for this to help us deal with these random delays that occur between Click() and the page actually loading.
Thanks,
Robert