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

Commit

Permalink
By.js locator should accept functions
Browse files Browse the repository at this point in the history
The Protractor documentation says that By.js is inherited from Selenium Webdriver, and the types for that define the function signature for `js` like I have done in this PR.

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/selenium-webdriver/index.d.ts#L2441
  • Loading branch information
monkpit authored and heathkit committed Jul 15, 2017
1 parent 88a1b3a commit 3f861ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/locators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export class WebdriverBy {
css: (css: string) => By = By.css;
id: (id: string) => By = By.id;
linkText: (linkText: string) => By = By.linkText;
js: (js: string) => By = By.js;
js: (js: string | Function, ...var_args: any[]) => By = By.js;
name: (name: string) => By = By.name;
partialLinkText: (partialText: string) => By = By.partialLinkText;
tagName: (tagName: string) => By = By.tagName;
Expand Down

0 comments on commit 3f861ae

Please sign in to comment.