Forum Discussion

SvitlanaS's avatar
SvitlanaS
New Contributor
2 years ago

Waiting full loading of image

Hello,

 

I'm testing add-in in Microsoft Office. I need to compare an image, which is displayed in this add-in,  with  the image, which is saved as expected result.

I have a problem with waiting full loading of this image. All properties of image is already have information that  image is loaded, but it is not.
 I tried to use WaitChild and WaitProperties: 
IsLoaded
IsVisible
Visible
Exists
Visibility=Visible
Enabled
VisibleOnScreen
IsEnabled
IsInitialized
All these properties are true, but the image is not still loaded.
Also, I tried run methods of this object like get_IsLoaded, get_IsFocused , get_IsEnabled, get_DataContext. They all have result true but the image is not still loaded.
Could you please help what else I can use except just Dalay for waiting for this image?

3 Replies

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    Have you used the Object Spy tool on the image (or parent object) to see if there's anything in the properties or methods that indicates the image is loaded?

     

    When the image is loading, is there some sort of button or menu item that's disabled, and will only become enabled once the image is fully loaded? If yes, then you can use that as an indicator via waiting for that control to be enabled.

     

    If there's no indication as to when the image is loaded, then you might have to use a delay.

     

    Is the add-in developed by your team?

     

  • rraghvani's avatar
    rraghvani
    Champion Level 3

    If there's no other alternative solution, then ask your team if they can implement some sort of feature which indicates that the image is fully loaded, which you can then use for your automation work.