When testing dynamic elements of your site, it's helpful to verify that an item is no longer visible or available to the user. A great tool for testing this type of behavior is called "Not on Page" in Architect. This can be useful for confirming proper navigation between site pages, pop-up windows, and items like context-based state changes in menus.
Verifying an Element is Not on the Page
- Start a new test with Architect.
- Determine the element (in our example, we are selecting an image that isn't shown elsewhere on the site) which will be verified as not on the page.
- Add a Verify action to the image.
- Open the details for the verify action by clicking the white circle.
- Open the ADV Selector tab and select the xpath for the image.
- Close the details panel.
- Click on the site to open a new page.
- Click the blue + button to open the Action panel.
- Select Not On Page.
- Enter the xpath for the element copied from the Verify action into the Search Selector Expression text box. You also have the option of entering an Attribute, an Operator, and the Element Value for a stronger search.
- Click Continue to add the Not On Page step to your test and close the Action panel.
- Save your test.
- When the test is run, it will verify the element is not found on the page.