I am testing a product that allows the user to open practically any file types. So far, I have gotten to open files recursively from a directory which houses all the different file formats.

There are several file types that open differently than when it is opened manually using the same application. For example, the test opens an .avi or .mov file, sometimes it displays the movie, sometimes, it doesn't. And when it does, the movie displays in the top center of the application.

When opening the same file format manually (using the same application that I am testing), the movie is displayed in the center of the application and usually starts playing automatically.

I have been inserting sleep functions in between to see if that makes a difference but no luck. Has anyone got any other suggestions that I can try?