mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-10 11:40:16 +08:00
WIP: Add webdriver.By.Hash
`webdriver.By.Hash` is a Closure Llibrary style type alias. If we assign `webdriver.By.Hash`, we get an `undefined`. I think the assignment should have an error, because it have no meanings.
This commit is contained in:
+34
@@ -4783,6 +4783,40 @@ declare module webdriver {
|
||||
|
||||
var By: ILocatorStrategy;
|
||||
|
||||
module By {
|
||||
/**
|
||||
* Short-hand expressions for the primary element locator strategies.
|
||||
* For example the following two statements are equivalent:
|
||||
*
|
||||
* var e1 = driver.findElement(webdriver.By.id('foo'));
|
||||
* var e2 = driver.findElement({id: 'foo'});
|
||||
*
|
||||
* Care should be taken when using JavaScript minifiers (such as the
|
||||
* Closure compiler), as locator hashes will always be parsed using
|
||||
* the un-obfuscated properties listed.
|
||||
*
|
||||
* @typedef {(
|
||||
* {className: string}|
|
||||
* {css: string}|
|
||||
* {id: string}|
|
||||
* {js: string}|
|
||||
* {linkText: string}|
|
||||
* {name: string}|
|
||||
* {partialLinkText: string}|
|
||||
* {tagName: string}|
|
||||
* {xpath: string})}
|
||||
*/
|
||||
type Hash = {className: string}|
|
||||
{css: string}|
|
||||
{id: string}|
|
||||
{js: string}|
|
||||
{linkText: string}|
|
||||
{name: string}|
|
||||
{partialLinkText: string}|
|
||||
{tagName: string}|
|
||||
{xpath: string};
|
||||
}
|
||||
|
||||
/**
|
||||
* An element locator.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user