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

Commit

Permalink
fix(website): fix all locator examples to use element over `browser…
Browse files Browse the repository at this point in the history
….findElement` (#4413)
  • Loading branch information
wswebcreation authored and cnishina committed Jul 31, 2017
1 parent 768fd39 commit b87159b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions lib/selenium-webdriver/locators.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ webdriver.By = {};
*
* @example
* // Returns the web element for dog
* var dog = browser.findElement(by.className('dog'));
* var dog = element(by.className('dog'));
* expect(dog.getText()).toBe('Dog');
*
* @param {string} className The class name to search for.
Expand All @@ -50,7 +50,7 @@ webdriver.By.className = webdriver.Locator.factory_('class name');
*
* @example
* // Returns the web element for cat
* var cat = browser.findElement(by.css('.pet .cat'));
* var cat = element(by.css('.pet .cat'));
* expect(cat.getText()).toBe('Cat');
*
* @param {string} selector The CSS selector to use.
Expand All @@ -71,7 +71,7 @@ webdriver.By.css = webdriver.Locator.factory_('css selector');
*
* @example
* // Returns the web element for dog
* var dog = browser.findElement(by.id('dog_id'));
* var dog = element(by.id('dog_id'));
* expect(dog.getText()).toBe('Dog');
*
* @param {string} id The ID to search for.
Expand Down Expand Up @@ -140,7 +140,7 @@ webdriver.By.js = function(script, var_args) {};
*
* @example
* // Returns the web element for dog
* var dog = browser.findElement(by.name('dog_name'));
* var dog = element(by.name('dog_name'));
* expect(dog.getText()).toBe('Dog');
*
* @param {string} name The name attribute to search for.
Expand All @@ -161,7 +161,7 @@ webdriver.By.name = webdriver.Locator.factory_('name');
*
* @example
* // Returns the 'a' web element for doge meme and navigate to that link
* var doge = browser.findElement(by.partialLinkText('Doge'));
* var doge = element(by.partialLinkText('Doge'));
* doge.click();
*
* @param {string} text The substring to check for in a link's visible text.
Expand Down Expand Up @@ -206,7 +206,7 @@ webdriver.By.tagName = webdriver.Locator.factory_('tag name');
*
* @example
* // Returns the 'a' element for doge meme
* var li = browser.findElement(by.xpath('//ul/li/a'));
* var li = element(by.xpath('//ul/li/a'));
* expect(li.getText()).toBe('Doge meme');
*
* @param {string} xpath The XPath selector to use.
Expand Down

0 comments on commit b87159b

Please sign in to comment.