[UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming) +--- Thread: [UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action (/Thread-UFT-12-52-VBScript-Test-object-exist-is-visible-and-enabled-before-take-an-action) |
[UFT 12.52/VBScript] Test object exist, is visible and enabled before take an action - sparkwanted - 02-07-2017 I'm automating tests using UFT 12.52 for an application. I captured the objects for a repository and then started to create a sequence of actions on the objects. However, there is a frequent problem. Before calling an action on an object it needs to exist, be visible and in some cases enabled(case of textboxes). To solve this problem I thought, before the call to any action on the object, test if the object exists, is visible and enabled, if the 3 or 2 properties are true, then make a action with the object. Testing these properties of the object would be done until a timeout has been exceeded. If the timeout was exceeded an exception would be thrown to be handled. I developed the code below, but the result is very unstable behavior:
Could someone help me? Any help will be welcome. Code: Function test |