testing/marionette/atoms/HOWTO

Thu, 22 Jan 2015 13:21:57 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Jan 2015 13:21:57 +0100
branch
TOR_BUG_9701
changeset 15
b8a032363ba2
permissions
-rw-r--r--

Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6

michael@0 1 These atoms are generated from the selenium trunk. They are minified versions of what's in the trunk,
michael@0 2 optimized to run on Firefox. To generate them, clone the repo:
michael@0 3
michael@0 4 svn checkout http://selenium.googlecode.com/svn/trunk/ selenium-read-only
michael@0 5
michael@0 6 then run the Google closure compiler and specify which atom you'd like to get.
michael@0 7 For example, this will generate the "get_text" atom:
michael@0 8
michael@0 9 cd selenium-read-only
michael@0 10 ./go //javascript/webdriver/atoms:get_text:firefox
michael@0 11
michael@0 12 This generates the atom, which is a function. You'll need to assign that function to a variable of your choice
michael@0 13 which you can then import, i.e.: you'll need to modify the atom with a variable assignment:
michael@0 14
michael@0 15 var myVar = <atom code>
michael@0 16
michael@0 17 You can now import this atom and call it with myVar(). Please note the name of the function as a comment above this line to help readability in the atoms file.
michael@0 18
michael@0 19 For more information on atoms, refer to http://code.google.com/p/selenium/wiki/AutomationAtoms#Atoms_Summary
michael@0 20
michael@0 21 Currently bundled atoms (please update as you add more):
michael@0 22 - clearElement
michael@0 23 - click
michael@0 24 - getAttributeValue
michael@0 25 - getElementText
michael@0 26 - isElementDisplayed
michael@0 27 - isElementEnabled
michael@0 28 - isElementSelected
michael@0 29 - sendKeysToElement/type

mercurial