Verify downloaded file is a word document

Hi Everyone,

The following is the test I want to run.
I go to the web application and press the download word document link.
Once the file is downloaded and opened, I want to verify if the file is a “.docx” file.

I see a solution if I use the robot class but I was wondering if anyone knows a simpler solution?

Best

UPDATE: See @B_L’s answer below: Verify downloaded file is a word document

[Old post:]


If you want to verify it’s a valid Word document, then I think the only way to be sure would be to automate it with Winium. But that’s a much bigger task than verifying the document downloaded and has extension .docx.

See how far you get with the Robot class first. If you can satisfy yourself you have done enough, then that’s probably good enough. Otherwise, type Winium into the search box above.

p.s. - Maybe AutoIt will work? Not sure… never used it.

1 Like

I’ve run into this before and though this might not be the best solutions I just posted what I’ve done to tips and tricks here:

Basically you could use this keyword and put in your filename.docx

you would at least see if a file was downloaded with the docx ext. I hope this is useful to you

1 Like