...

/

Complete Test with Verification

Complete Test with Verification

Learn to verify content present on a website by using RSpec.

We'll cover the following...

Web test drivers, such as Watir and Selenium WebDriver, drive browsers. However, to use them effectively for testing, we need to put them in a test framework that defines test structures and provides assertions (performing checks in test scripts after driving the application to a certain point).

In the context of web testing, typical checks are as follows:

  • Verify that specific texts are present

  • Verify the page title

  • Verify a link is present

  • Verify a web control is present or hidden

Basics of RSpec

RSpec is a popular test framework in Ruby. We can perform a standard gem installation to get it on our system.

Executing an RSpec file

...