From the course: Advanced Selenium: Automation Frameworks
Unlock the full course today
Join today to access over 22,500 courses taught by industry experts or purchase this course individually.
Testing with Selenide: Assertions - Selenium Tutorial
From the course: Advanced Selenium: Automation Frameworks
Testing with Selenide: Assertions
- [Presenter] Now that we've got our form filled out, let's go ahead and practice some assertions on it. In the IDE, go ahead and go to the line where we set the name field. Copy just the selector. Make some room at the bottom. And paste our selector. Now, we're going to call this shouldHave method. shouldHave, shouldBe, shouldNot, these are all variations on the should method. They do about the same thing. It's just there for fluent assertions and tags so that your code looks a little bit more linguistic. We're going to go ahead and pass in a condition of value. And then we're going to give that an argument. It needs a string. And we'll go ahead and give it whatever you set for the name in your own code. There is an assertion to check that the name field should have a value of Jane Waldrop. Assertions on text fields are relatively simple and straightforward. They're best handled by Selenide's built-in conditions.…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
(Locked)
Getting Started with Java46s
-
(Locked)
Managing packages with Maven4m 2s
-
(Locked)
Introducing JUnit2m 27s
-
(Locked)
Introducing Selenide1m 14s
-
(Locked)
Testing with Selenide: Navigate and wait3m 54s
-
(Locked)
Testing with Selenide: Inputs4m 36s
-
(Locked)
Testing with Selenide: Assertions3m 6s
-
(Locked)
-