Forum Discussion

von_bailey's avatar
von_bailey
Contributor
11 years ago

Conflicting values for "VisibleOnScreen"


I have some code that worked for some time, but now it doesn't.  The object I'm looking for on the screen is in the same place as it always has been and it also gives the same mapping information when using the object spy that is in the code.  The problem is that in both the object spy and the Evaluation tool both give the value for the object as "false".  But I can see the object on the screen and when I find it in the Object Browser, it says that the same object with no changes in it's state, is VisibleOnScreen = "true".  Why would I be getting different values for the same object in references to it's visibility?



The only difference is that I have installed the mobile module.  I bring this up because ever since I did so I get an error (see attached image) that implies that there is something wrong with the applications ability to find objects effectively.


  • Hi - try a call to Aliases.RefreshMappingInfo() before you check if the item is visible or not.

  • That didn't work.  In fact, the script didn't recognize the command as a viable function.  Says it cannot find the object.  Here's the code.



     



                if(email.Exists)

                  {email.cell(19,1).RefreshMappingInfo()

                  if(email.cell(19,1).VisibleOnScreen==false)

                    {theLink.Keys("[PageDown]")}


  • Replaceing the "email.cell(19,1).RefreshMappingInfo()" with a delay(2500) appears to have resolved the issue for the script, but not necessarily for TC which has the conflicting values still, if I pause and check.