Contributions
Re: Script for performing an action if mapped item exists and is active
Im sorry, but what are Item Name and Item Property? As far as I can tell our objects dont have specific names and the properties are generated dynamically so they change every time. Unless those mean something else?910Views0likes0CommentsScript for performing an action if mapped item exists and is active
New to Test complete and coding in general but Im trying to write a script to check if a mapped object exists and is enabled, and if it does not exist do nothing. I keep running into a problem where if the mapped object does not exist it errors out of the code rather than just doing nothing. Here's what I have so far of the code in question. If (Aliases.browser.MappedItem.Exists && Aliases.browser.MappedItem.Enabled) { Docodefunctionshere(); } else { Log.Message("No Matching Case") } The problem here is that sometimes when running this code the mapped object definitely will exist, and other times it will not, however when it runs with a time that it does not exist I get a message that it cant find that object to tell if it exists or not. So it seems like its telling me it cant tell me if it exists because it doesn't exist. Is there a way to get this to work?Solved938Views0likes3Comments