Tooltips were traditionally implemented as a 'title' attribute to an element. The value of this attribute was shown as a tooltip on mouse-hover. This is a static text giving information about the element with no styling.
Here, let's see how to use a couple of classes and methods we would need to move a slider element by an offset.
Step 1) In order to use the API, the following packages/classes needs to be imported:
Step 2) Create an object of "Actions" class and build the Sequence of user actions. Actions class is used to build the sequence of user actions like moveToElement(), dragAndDrop() etc. Various methods related to user actions are provided by API.
The driver object is provided as a parameter to its constructor.
Step 3) Create an Action Object using the build() method of the "Actions" class. Call the perform() method to execute all the actions built by the Actions object(builder here).
We have seen how to use some of the user Actions methods provided by the API - clickAndHold(element), moveByOffset(10,0), release(). The API provides many such methods.