O'Reilly logo

Selenium 2 Testing Tools Beginner's Guide by David Burns

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Updating a test to assert items are on the page

In the last few steps we were able to record a workflow that we would expect the user to perform. It will test that the relevant bit of functionality is there, like buttons and links to work against. Unfortunately we are not checking that the other items on the page are there or if they are visible when they should be hidden. We are going to work against the same page as before but we shall make sure that different items are on the page.

There are two mechanisms for validating elements available on the application under test. The first is assert; this allows the test to check if the element is on the page. If it is not available then the test will stop on the step that failed. The second is verify ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required