exception has been thrown by the target of invocation - 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: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: exception has been thrown by the target of invocation (/Thread-exception-has-been-thrown-by-the-target-of-invocation) |
exception has been thrown by the target of invocation - trupti10 - 03-04-2008 i keep getting this error and there is no reason that i can mention for it to occur because sometimes it comes up and sometimes it doeesnt. and it comes for the following line : Code: SwfWindow("AiCMS Case Management").SwfWindow("Manage Case").SwfToolbar("_ManageCase_Toolbars_Dock_Area").ClickToolbarTool "tbMain","SAVERECEIPT" Pls help RE: exception has been thrown by the target of invocation - Ankur - 03-11-2008 make sure to open QTP first then AUT... Also are you running the application from Eclipse? RE: exception has been thrown by the target of invocation - trupti10 - 03-12-2008 no i m not running the application from Eclipse. In fact now we have moved on to Infragistics 7.3 CLR 2.0 and all seems ok to me with the config files and the sample scripts in Testadvantage also executed as well But my application after checking all of this still gives the following error though it records correctly. Code: Object doesn't support this property or method: 'SwfWindow(...).SwfWindow(...).SwfEdit(...).set' for the following line Code: SwfWindow("AiCMS Case Management").SwfWindow("Search").SwfEdit("txtLastOrg").Set "a" This is the script file : Code: Dim objConnection This is the function library for generateDB function Code: Public Function generateDB(byref objConnection,byref objRecordset, strQuery) Sometimes it gives me a "General Run Error" at the beginning itself. Sometimes it gives the "exception has been thrown by the target of invocation" error. It acts weird is all that i can say. So now how can we resolve this? RE: exception has been thrown by the target of invocation - Ankur - 03-12-2008 See if .type method works . If it works you can use, Type "a" instead of Set "a" |