62
edits
(→Setup) |
(→APIs) |
||
Line 12: | Line 12: | ||
= APIs = | = APIs = | ||
The | The three main interfaces that are used are Actions, Driver and Element. Driver finds elements, and has a direct relation to the Gecko to set up the . Element represents each of the available UI objects in Fennec including the Awesomebar, the 'tabs' button, and different lists and menus. Actions has a list of commonly used non-element specific actions that can be taken on the application, such as dragging and sending keys. | ||
<pre> | |||
Actions | |||
//This will cause this process to spin until the gecko fires a specific JSON event, such as DOMContentLoaded | |||
void waitForGeckoEvent(String geckoEvent); | |||
//Clicks the given Key (Element.SpecialKey.[DOWN|UP|LEFT|RIGHT|ENTER]) | |||
void clickSpecialKey(SpecialKey button) | |||
//Sends a string of characters to the system. (most have been implemented but not all) | |||
void sendKeys(String keysToSend); | |||
//Sends a drag action across the screen | |||
void drag(int startingX, int endingX, int startingY, int endingY) | |||
</pre> | |||
<pre> | <pre> | ||
Driver | Driver | ||
Line 36: | Line 49: | ||
//To click the element. | //To click the element. | ||
void click() | void click() | ||
//Returns true if the element is currently displayed | //Returns true if the element is currently displayed | ||
boolean isDisplayed(); | boolean isDisplayed(); |
edits