Contributions
Running Project without Opening Test Scripts
Hey All, Everytime I run my project it always opens the scripts that get called in a new tab in my workspace. By the end of the run I'm left with a bunch of tabs open and I was wondering if there's a way to prevent the scripts from opening in the first place. I tried looking through the properties but didn't see anything that could do that. If anyone knows how to turn that off or knows of a workaround of some sort, I would really appreciate any insight! Thanks, Chris1.1KViews0likes1Comment- 807Views0likes0Comments
Script Produces Varying Results
Hey All, I have the following few lines of code in one of my test scripts: var instance = Sys.Process("java").SwingObject("BaseMonitorFrame", "Clarity #1", 0).SwingObject("Instance", "", 0); instance.Drag(783, 327, -224, 244); Delay(500); instance.Click(930, 559); Basically, these lines in my script draw two lines to form an angle on an image. However every time I run my script the first line that gets drawn is almost always slightly different in length from a previous run. Does anyone know why this might be happening? Best, ChrisSolved1.6KViews0likes2CommentsRe: Scripting without Aliases
Hey Tanya, I ran the script today and for some reason I got a different error. Today it said that it was "Unable to find the object SwingObject("textArea")". Do you have any idea why the error would be different when I did not change any of the script? But to answer your question, both the tabbedPane and textArea objects appear on the screen during test execution. So from what I understand, I need to use one of the WaitNNN methods in my script because a swing object is not active when it gets called. Am I way off or is that the general idea? If that's correct when would I use the WaitNNN method in my script? Thank You, Chris2.4KViews0likes0CommentsRe: Scripting without Aliases
Hey Tanya, So I'm having some trouble with using full names in my test scripts. I have a line in my code that is producing an error: var textArea = Sys.Process("java").SwingObject("Form").SwingObject("JRootPane", "", 0).SwingObject("null.layeredPane").SwingObject("null.contentPane").SwingObject("tabbedPane").SwingObject("Form"). SwingObject("holderPanel").SwingObject("Form").SwingObject("jScrollPane1").SwingObject("JViewport", "", 0).SwingObject("textArea"); But for some reason it produces an error saying "Unable to find the objectSwingObject("tabbedPane")". I thought that I would be able to use an object's full name that I found from the object browser and reference it in my script like the above line. Is there something I misunderstood and/or could you give me some advice on how to continue from here? I really appreciate all the help! Best, Chris2.4KViews0likes0CommentsRe: Scripting without Aliases
Hey Deepak, Thank you for helping me understand that a little better. The problem I'm having now is that I don't know how to look at the objects properties. They aren't in the name mapping repository unless they get mapped there (which usually hasn't worked for me) and nothing is showing up in my object browser except for the top level "Sys" process. I have had limited success with FindChild in my project thus far though and would appreciate any further insight you or anyone could give me. Best, Chris2.4KViews0likes0CommentsScripting without Aliases
Hey All, I'm currently testing an application where I can record scripts and the name mapping will work. However, when I quit the application and try to rerun the scripts I recorded, most of them produce the "Ambiguous recognition of the tested object" warning which then leads to the "Object does not exist" error. I read in a separate thread (http://smartbear.com/forums/f74/t90568/what-is-the-best-approach-for-scripting-with-na/) that you can find objects dynamically by using Find, FindChild, etc. with object properties. This seems like what I'm looking for because I'm pretty sure that everytime I close and reopen my application the properties of various objects change and in turn breaks the name mapping of my test project. Could someone help clarify how the Find methods work in getting objects during testing? Thank You, ChrisSolved3.7KViews0likes9Comments"The object does not exist"
Hi, I am new to TestComplete and I was confused about the name mapping functionality of it. I recently recorded a test using the "Record Script" feature and when I tried to run the script I received the "object does not exist" error. I decided to look at the Name Mapping editor because the error in the log told me which object was not found. When I try to edit the object a popup window appears and says 'Unable to find the object that matches the "tabbedPane" item'. But when I do this with other objects in the same level that share the same parent as the "tabbedPane" object, it works fine. I don't understand why it wasn't able to map that object. I'm a novice with this so please let me know if I used any of the terminology incorrectly or if I need to be more specific with my problem. Any help would be greatly appreciated! Thank You, ChrisSolved1.6KViews0likes1Comment