From the course: Python Automation and Testing

Unlock the full course today

Join today to access over 24,700 courses taught by industry experts.

Filling forms

Filling forms

- [Narrator] So far, we have seen how to send keys to text inputs and text areas. The question at hand is how to deal with other form elements. Selenium comes with a wide toolbox of classes and functions that can help you deal with other form elements. The select class helps you deal with select elements in the form and it also comes with a submit method that works on every element in the form. So, let's go to a code example and see how to use these functions and classes. I'm going to head over to the exercise files folder on the desktop. In the exercise files, I'm going to go to chapter three, second part. I have an HTML code that I'm going to be using as a form for this chapter. So let's run this code and see what the output is. So you can see there's a select element with a variety of values and a submit element. I'm going to to copy the path of this file so that we can use it directly within our code. Now I'm going to head over to IDLE, where I'll open a new file. Let's quickly…

Contents