Open icnocop opened 8 years ago
Hi, why do you want to access the browser window directly?
The web application I am testing prompts the user to open/save a file, and in order to validate the downloaded file, I have to interact with the BrowserWindow using CodedUI WinControls in order to click on the Save > "Save as" button in the Notification window that appears:
I'm able to automate the saving of the file without an issue, it's just that I have what seems to be a "code smell" when it comes to retrieving the BrowserWindow.
If the ability to save the file is built-in to SpecBind that would be more ideal, but it seems that making the BrowserWindow publicly accessible is more flexible for extending the capabilities of SpecBind for other requirements that may be required in the future.
For example, my step reads as follows:
Given I was prompted to download "11.msr"
That step does the following:
Lastly, I have an "AfterScenario" SpecFlow binding hook to delete the temporary file if it exists.
This help a lot when testing responsive pages and you need to resize the BrowserWindow.
I would like to get the BrowserWindow from the CodedUIBrowser.
Thank you.