Learn how to fill in form elements with a short code example.
- [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 look at the HTML code once before that.…
- Identify the steps for installing Python.
- Recognize the browsers supported by Selenium.
- Explain how to find an element when a unique ‘id’ is not available.
- Understand the purpose of the “send_keys.”
- Recall which exception is raised when a function tries to locate an element not yet loaded into the DOM.