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

Line 16: Line 16:
= APIs  =
= APIs  =


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.
The three main interfaces that are used are Actions, Driver and Element.  


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>
Actions
Actions
Line 30: Line 31:
</pre>
</pre>


Element represents each of the available UI objects in Fennec including the Awesomebar, the 'tabs' button, and different lists and menus.
<pre>
Element
  //To click the element.
  void click()
  //Returns true if the element is currently displayed
  boolean isDisplayed();
  //Returns the text currently displayed on the element, or direct sub-elements.
  String getText();
</pre>
Driver finds elements and provides info about the UI.
<pre>
<pre>
Driver
Driver
Line 47: Line 60:
   int getGeckoHeight();
   int getGeckoHeight();
   int getGeckoWidth();
   int getGeckoWidth();
</pre>
<pre>
Element
  //To click the element.
  void click()
  //Returns true if the element is currently displayed
  boolean isDisplayed();
  //Returns the text currently displayed on the element, or direct sub-elements.
  String getText();
</pre>
</pre>


Confirmed users
1,759

edits