Using the API to solve difficult problems

So far, we had a look at the basic API implementation. Now, let's have a look at some day-to-day problems that you will probably come across and how we can use the Actions class to solve them.

Working with hover menus

First of all, we need to create a basic HTML page. We are going to use some CSS to style a CSS hover menu. To try and keep it in small, manageable chunks, we will break up the page into a couple of pieces. Let's start by writing the HTML:

<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <title>CSS Menu</title> <style type="text/css">${TBC}</style> </head> <body> <ul> <li id="home">Home</li> <li id="about">About</li> <li id="services"> Services <ul> <li>Web Design</li> <li>Web Development</li> ...

Get Mastering Selenium WebDriver now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.