From 9515c65ee32b9b81b65b75915bce33188c088976 Mon Sep 17 00:00:00 2001 From: pspi Date: Fri, 23 May 2014 12:34:07 +0300 Subject: [PATCH] Add protractor button text locators. --- angular-protractor/angular-protractor-tests.ts | 2 ++ angular-protractor/angular-protractor.d.ts | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/angular-protractor/angular-protractor-tests.ts b/angular-protractor/angular-protractor-tests.ts index 2ed627af8..37c9e49bc 100644 --- a/angular-protractor/angular-protractor-tests.ts +++ b/angular-protractor/angular-protractor-tests.ts @@ -223,6 +223,8 @@ function TestLocatorStrategies() { webElement = ptor.findElement(protractor.By.model('model')); webElement = ptor.findElement(protractor.By.textarea('textarea')); webElement = ptor.findElement(protractor.By.repeater('repeater')); + webElement = ptor.findElement(protractor.By.buttonText('buttonText')); + webElement = ptor.findElement(protractor.By.partialButtonText('partialButtonText')); } // This function tests the methods that were added to the base WebElement class diff --git a/angular-protractor/angular-protractor.d.ts b/angular-protractor/angular-protractor.d.ts index a78fc42f3..3c3c0981f 100644 --- a/angular-protractor/angular-protractor.d.ts +++ b/angular-protractor/angular-protractor.d.ts @@ -646,6 +646,10 @@ declare module protractor { * var rows = element(by.repeater("cat in pets")); */ repeater(repeatDescriptor: string): webdriver.Locator; + + buttonText(searchText: string): webdriver.Locator; + + partialButtonText(searchText: string): webdriver.Locator; } var By: IProtractorLocatorStrategy;