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

Commit

Permalink
fix(element): fix WebElement.$ using the incorrect By object
Browse files Browse the repository at this point in the history
Closes #852
  • Loading branch information
juliemr committed May 23, 2014
1 parent a368de0 commit 00c6abe
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/protractor.js
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,8 @@ Protractor.prototype.wrapWebElement = function(element) {
* @return {!webdriver.WebElement}
*/
element.$ = function(selector) {
var locator = thisPtor.By.css(selector);
return this.findElement(locator);
var locator = webdriver.By.css(selector);
return thisPtor.findElement(locator);
};

/**
Expand Down Expand Up @@ -718,8 +718,8 @@ Protractor.prototype.wrapWebElement = function(element) {
* array of the located {@link webdriver.WebElement}s.
*/
element.$$ = function(selector) {
var locator = thisPtor.By.css(selector);
return this.findElements(locator);
var locator = webdriver.By.css(selector);
return thisPtor.findElements(locator);
};

/**
Expand Down

0 comments on commit 00c6abe

Please sign in to comment.