Auto-tools/Projects/Robocop/WritingTests: Difference between revisions

m
Line 12: Line 12:
= APIs  =
= APIs  =


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.
The three main interfaces that are used are Actions, Driver and Element. Driver finds elements. 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 clicking, dragging and sending key events.


<pre>
<pre>
Line 18: Line 18:
   //This will cause this process to spin until the gecko fires a specific JSON event, such as DOMContentLoaded
   //This will cause this process to spin until the gecko fires a specific JSON event, such as DOMContentLoaded
   void waitForGeckoEvent(String geckoEvent);
   void waitForGeckoEvent(String geckoEvent);
   //Clicks the given Key (Element.SpecialKey.[DOWN|UP|LEFT|RIGHT|ENTER])
   //Clicks the given Key (Actions.SpecialKey.[DOWN|UP|LEFT|RIGHT|ENTER])
   void clickSpecialKey(SpecialKey button)
   void sendSpecialKey(SpecialKey button)
   //Sends a string of characters to the system. (most have been implemented but not all)
   //Sends a string of characters to the system. (most have been implemented but not all)
   void sendKeys(String keysToSend);
   void sendKeys(String keysToSend);
Confirmed users
1,759

edits