© The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature 2021
S. ShuklaThe Protractor Handbookhttps://doi.org/10.1007/978-1-4842-7289-3_7

7. Jasmine and Selenium Assertions

Shashank Shukla1  
(1)
Mandla, Madhya Pradesh, India
 
This chapter discusses assertions. In automation, the validations in test scripts are known as assertions. Node.js has a built-in assertion library that is called as follows: const assert = require(assert). No installation is required. However, Protractor uses Jasmine’s assertions to perform validations. You will look at the following examples in this chapter.
  • Expected result is equal to the actual result

  • Expected result is the actual result

  • Expected result is positive

  • Expected result is negative

  • Negative ...

Get The Protractor Handbook: Understanding and Implementing the Tool Effectively now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.