In this section we will have a look at how we can press down the left mouse button and then move it around the page. If you are working on a canvas that tracks the mouse movements, you would be able to draw a picture with the actions API. Let's see this in action:

Open up inteliij and create a new Selenium WebDriver project.

Create a new class and a new test with the following code:

Run the test. You should see the following:

What just happened?

We have just seen how easy it is to hold the mouse button down and move it all over the page and then release the buttons. This type of action is one of the most complex types of work that we will have to do since it marries together a few.