Tester
Tester

Reputation: 11

Adding assertions Coded UI tests

I am working on testing a add on on MS Word using Coded UI tests in Visual Studio. I am at a point where I need to verify that after signing in, the user sees a new pop up window. I am not sure how to verify this. I try dragging the cross hair icon over on the pop up window, but am not sure which assertion to add.

Upvotes: 0

Views: 1839

Answers (1)

EdmundYeung99
EdmundYeung99

Reputation: 2511

If you drag the assertion tool over the entire Window, you can do an assertion over one or all of the following:

  • Control Type - this will ensure that your 'webpage dialog' is a 'window'
  • Exists - this will check that your 'webpage dialog' exists and has indeed poped up. This is good for creating a negative test too (e.g. testing a scenario where the window should not popup if the user does not sign in correctly)
  • Title - if you know what the title of your popup is, you can test that too

Upvotes: 1

Related Questions