Skip to content
This repository has been archived by the owner on Jul 29, 2024. It is now read-only.

Commit

Permalink
fix (element): Allow ElementFinder to be passed to actions directly.
Browse files Browse the repository at this point in the history
Previously, do to an action such as drag and drop, one would have to use
`element(by.foo).find()`. Now, just passing `element(by.foo)` works. For example:

```javascript
browser.actions().doubleClick(element(by.id('mybutton'))).perform();
```
  • Loading branch information
juliemr committed Mar 19, 2014
1 parent 0c4ef69 commit 4fd060a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var DEFER_LABEL = 'NG_DEFER_BOOTSTRAP!';
var WEB_ELEMENT_FUNCTIONS = [
'click', 'sendKeys', 'getTagName', 'getCssValue', 'getAttribute', 'getText',
'getSize', 'getLocation', 'isEnabled', 'isSelected', 'submit', 'clear',
'isDisplayed', 'getOuterHtml', 'getInnerHtml'];
'isDisplayed', 'getOuterHtml', 'getInnerHtml', 'toWireValue'];

var STACK_SUBSTRINGS_TO_FILTER = [
'node_modules/minijasminenode/lib/',
Expand Down
2 changes: 1 addition & 1 deletion spec/basic/actions_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe('using an ActionSequence', function() {
expect(sliderBar.getAttribute('value')).toEqual('1');

browser.actions().
dragAndDrop(sliderBar.find(), {x: 400, y: 20}).
dragAndDrop(sliderBar, {x: 400, y: 20}).
perform();

expect(sliderBar.getAttribute('value')).toEqual('10');
Expand Down

0 comments on commit 4fd060a

Please sign in to comment.