Contributions
Re: Wait time for FindAll
Chris, Thanks for the info. Two things... Based on what you said, my FindAll is taking 9 seconds due to the length of time it takes to traverse the whole DOM. Correct? If so, interesting; I hadn't thought of that and I'll have to give it a try. Regarding the Wait, I've seen a couple of instances using IE where the Wait returns indicating the page is no longer busy, but the page is still not loaded. I discovered this when chasing down a race condition.Verified this by recording a screen video of the execution and stepping through the replay of the video frame-by-frame; doing this, I discovered that the page busy "spinner" in the IE tab was still visible, but script execution had continued. Thanks again, Paul1.4KViews0likes0CommentsRe: Wait time for FindAll
Ryan, Thanks for the quick reply. My approach for waiting is similar to yours, just non-recursive. More specifically, what I'm asking is this: how do I reduce the time that the find FindAll waits for an element to exist? In the one example I'm looking at, FindAll seems to wait about 9 seconds for the element to appear, I would like to reduce that amount of time so that I can "poll" more frequently. Hopefully someone can help with this. Thanks again, Paul1.4KViews0likes0CommentsRe: Can't catch Error thrown from a method in a different file
Thanks for your quick response. This is extremely unfortunate; I'd missed this particular note when I originally read the "Specifics of Usage" info. Between this issue and the lack of Intellisense/code-completion, TestComplete's lack of support for user-defined objects is hindering my ability to create a future-proofed framework inside of the tool.1.2KViews0likes0CommentsCan't catch Error thrown from a method in a different file
Hello, Using JScript, I'm throwing an Error from a method (i.e. function on an object) ; the call to this method and the try/catch are in a different file. When the Error is thrown, it is not caught by the try/catch, instead it behaves like an unhandled Error and opens a TestComplete "Microsoft JScript Runtime Error" dialog. Interesting to note, the code DOES catch the Error if all code resides in the same file. Am I going about this correctly? Is this a limitation/bug/etc. I need to work around? Any guidance is appreciated. Code is below. Thanks!!!! Paul ------ This code lives in file named MyScript: //USEUNIT MyOtherFile function main() { try { Obj.thisMethodThrows(); } catch (e) { Log.Message("caught my error"); } } This code lives in file named MyOtherFile: Obj = { thisMethodThrows: function() { throw new Error("here's an error"); } }3.4KViews0likes4CommentsCode Completion for User-Defined Objects
Hello, When I have a user-defined JScript object in my test script (or in an external file that’s accessed via USEUNIT), I can’t figure out how to get code completion and “go to declaration” to work on methods defined on that object. For example, consider the following code: var MyObject = { method1: function (){ } } function function1() { } function main() { function1(); MyObject.method1(); } Code completion (ctrl-space) will complete the function name function1, but will not complete the name method1. Also, ctrl-click on the call to function1 will take me to the declaration of function1, but will not take me to the declaration of method1. Is there a way to cause this to work? My apologies if there’s already a topic on this, but I couldn’t find it. Thanks! Paul2.9KViews0likes2Comments