TestComplete - Interact with the Chrome download bar.
Hey everyone!
Today I would like to talk about how to interact with the downloads bar in Chrome. This has come up a few times recently and since interaction requires some additional setup in TestComplete to perform actions or validate file names, I thought it might be helpful for others to understand how to accomplish this task.
One caveat I would like to address up front, this solution will require the Desktop module alongside Web for TestComplete. Since we are making changes to how TestComplete interacts with the browser itself, not what is in the viewport, this will all be considered Desktop app setup.
Ultimately what we will to do is add the ‘WndClass’ of Chrome to the ‘MSAA’ properties within TestComplete.
To start, we will use our Object Spy on the main window of the Chrome browser to retrieve all of the properties. Once you have spied the main window, click on the 'Advanced View' within the Object Spy to retrieve the 'WndClass'. You can see in the image below this is 'Chrome_WidgetWin_1', which should be the case for most users.
Now that we have our ‘WndClass’, let’s go to ‘Tools -> Current Project Properties -> Open Applications -> MSAA’.
In the MSAA area, click on the ‘Add’ button, add (in my case) ‘Chrome_WidgetWin_1’ and Save your Project.
Now you are able to spy into the downloads bar so that you may interact with it or validate the file name!
I hope this was helpful and appreciate everyone reading along!
Happy Testing!