From 00c6abef16c47868974eed8ad1a4c38494b2a504 Mon Sep 17 00:00:00 2001 From: Julie Date: Fri, 23 May 2014 13:26:07 -0700 Subject: [PATCH] fix(element): fix WebElement.$ using the incorrect By object Closes #852 --- lib/protractor.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/protractor.js b/lib/protractor.js index 5c8bafc28..9d8048d1f 100644 --- a/lib/protractor.js +++ b/lib/protractor.js @@ -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); }; /** @@ -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); }; /**