chdittmer
11 years agoOccasional Contributor
Invisible object
Hi I have been trying to find a solution to my issue and have gone through a couple of similar threads with very little luck.
I am testing a java application that along the line pops up a dialogue with information on an action just completed. This dialogue covers a part of the application and then causes me not to be able to complete certain actions because they are no longer visible.
I simply want to close this popup dialogue, initially I did a simple record test clicked , the relavant button and played it back. First time works fine. The moment a new dialogue appears it is no longer visible. I need to map an new frame for the popup for me to use the new popup. Here is what I have tried:
Activating the parent frame (Did not work, frame no longer a valid mapping)
Refreshing the object mapping. (Still getting object not visible)
Refreshing the object. (Still getting object not visible)
Checked object.visibleonscreen in the script == true before attempting to click object. (Still getting object not visible)
Checked object.visible == true before attempting to click object. (Still getting object not visible)
Any advice on something else I can try?
For background information. My object mapping tends to be a little fragile because I have to map two identical processes to be exactly the same in order for the script to run on both debug and release version of the application. This makes it quite difficult for me to change the mapping of one since the other needs to be identical.
I am testing a java application that along the line pops up a dialogue with information on an action just completed. This dialogue covers a part of the application and then causes me not to be able to complete certain actions because they are no longer visible.
I simply want to close this popup dialogue, initially I did a simple record test clicked , the relavant button and played it back. First time works fine. The moment a new dialogue appears it is no longer visible. I need to map an new frame for the popup for me to use the new popup. Here is what I have tried:
Activating the parent frame (Did not work, frame no longer a valid mapping)
Refreshing the object mapping. (Still getting object not visible)
Refreshing the object. (Still getting object not visible)
Checked object.visibleonscreen in the script == true before attempting to click object. (Still getting object not visible)
Checked object.visible == true before attempting to click object. (Still getting object not visible)
Any advice on something else I can try?
For background information. My object mapping tends to be a little fragile because I have to map two identical processes to be exactly the same in order for the script to run on both debug and release version of the application. This makes it quite difficult for me to change the mapping of one since the other needs to be identical.
- Hi Carl,
You may find your testing life is improved greatly if you start using Finds instead of name mapping.
I find name mapping to be as you said "fragile" or at least unreliable.
I recently ran into a similar problem where an object I was looking to interact with was not visible.
It turned out that there were two objects nearly idential. One I could see and was visible and the other was invisible to me. I simply added a check for Visible == true to verify that I had the correct object.
Check out this article.
http://support.smartbear.com/viewarticle/55436/
Here is a JScript example of the find that I used for my object.
var RunDialog = Sys.WaitProcess("explorer", 500).Find(["WndCaption","WndClass","Visible"], ["Run", "#32770", "True"], 15);
You send the Find function two arrays and one integer.
The first array contains an array of properties and the second argument is an array of values for those properties. The last argument is how deep you want to search the object tree for your object.
Notice the third item in my first array is Visible and the third item in my second array is true. Without that check I would end up finding the object that was not visible but essentially identical and useless to me.
All I ever use are finds now. Finds are much more reliable in my opinion.
The article will have you make two arrays and populate them but I personally like just sending the arrays inside the argument.