I'm running a web application in TestComplete. When I Run
or Navigate
to the url for the application, the application won't respond with the full page response until the user enters their credentials. The problem is that the Run
method waits for a successful HTTP response before moving onto the next line of code, wherein said credentials are entered via script.
Eventually, the navigation will timeout and it will proceed executing the rest of the script (which runs fine). But this greatly delays the time it takes to execute a simple login test:
I thought one solution might be to use the PageLoadWaitTime
parameter on the Run
Method. According to the documentation for Run
, it takes an optional integer as the second parameter, but if I use the following syntax, the script no longer parses:
browser.Run("localhost", 2)
I've also followed the suggestion here and tried to cast to an integer type, but that doesn't work either:
<!-- language: lang-vb -->Dim waitTime
waitTime = 2
waitTime = CInt(waitTime )
browser.Run("localhost", waitTime )
Any ideas on how to either:
- use VBScript in this instance to shorten the length wait time (slightly hackish)
- or how to better optimize the page so that it waits for a HTTP 401 Challenge instead of a successful HTTP 200 response.