Skip to content

Commit

Permalink
Add atom fragments for use by marionette
Browse files Browse the repository at this point in the history
To compile, take a look at the `closure_fragment` rules in
the `//javascript/webdriver/atoms/BUCK`, and then compile
it with:

`./go //javascript/webdriver/atoms:is-enabled`

Optimised versions for particular drivers can be built by
appending one of:

  * `-android`
  * `-chrome`
  * `-ie`
  * `-ios`
  * `-firefox`

eg: `./go //javascript/webdriver/atoms:is-enabled-firefox`
  • Loading branch information
shs96c committed Sep 29, 2017
1 parent 4c6640f commit facd199
Showing 1 changed file with 41 additions and 1 deletion.
42 changes: 41 additions & 1 deletion javascript/webdriver/atoms/BUCK
Expand Up @@ -40,7 +40,15 @@ closure_library(name = 'attribute-lib',
],
)

closure_fragment(name = 'getAttribute',
closure_fragment(name = 'clear-element',
module = 'bot.action',
function = 'bot.action.clear',
deps = [ '//javascript/atoms:action' ],
visibility = [
],
)

closure_fragment(name = 'get-attribute',
module = 'webdriver.atoms.element.attribute',
function = 'webdriver.atoms.element.attribute.get',
deps = [ ':attribute-lib' ],
Expand All @@ -49,3 +57,35 @@ closure_fragment(name = 'getAttribute',
'//java/client/src/org/openqa/selenium/remote:get-attribute',
],
)

closure_fragment(name = 'get-text',
module = 'webdriver.atoms.element',
function = 'webdriver.atoms.element.getText',
deps = [ ':atoms-lib' ],
visibility = [
],
)

closure_fragment(name = 'is-displayed',
module = 'bot.dom',
function = 'bot.dom.isShown',
deps = [ '//javascript/atoms:dom' ],
visibility = [
],
)

closure_fragment(name = 'is-enabled',
module = 'bot.dom',
function = 'bot.dom.isEnabled',
deps = [ '//javascript/atoms:dom' ],
visibility = [
],
)

closure_fragment(name = 'is-selected',
module = 'webdriver.atoms.element',
function = 'webdriver.atoms.element.isSelected',
deps = [ ':atoms-lib' ],
visibility = [
],
)

0 comments on commit facd199

Please sign in to comment.