From the course: Advanced Selenium: Automation Frameworks
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Testing with Watir: Inputs - Selenium Tutorial
From the course: Advanced Selenium: Automation Frameworks
Testing with Watir: Inputs
- [Instructor] Now that we know our test will wait for the page to load, we'll move on to adding values to our input fields. Instead of adding a value to each and every field, we're going to work with one of each unique type of field on the form. Let's go ahead and reuse the selector for the first field by copying and pasting it. Make some room near the bottom. There we go. Now, we're going to call the set method and pass in a name as an argument. I used my name but you can use whatever you want. Now let's switch back to our browser. Go ahead and scroll to the dropdown selector labeled State. We'll inspect it. Notice that it has an ID of State. You can click the triangle icon next to the select element. You'll see all 50 states as options. Notice that each option has the state's name as text and it has a value that's the abbreviated name of the state. We'll go ahead and copy the state ID and switch back…
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 Ruby23s
-
(Locked)
Managing packages with Bundler4m 28s
-
(Locked)
Installing Bundler gems1m
-
(Locked)
Introducing RSpec59s
-
(Locked)
Introducing Watir1m 59s
-
(Locked)
Testing with Watir: Navigate and wait4m 39s
-
(Locked)
Testing with Watir: Inputs4m 41s
-
(Locked)
Testing with Watir: Assertions2m 22s
-
(Locked)
-
-
-