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

Commit

Permalink
chore(types): make TS think that ElementArrayFinder and ElementFinder…
Browse files Browse the repository at this point in the history
… are compatible with WebElement (#3732)
  • Loading branch information
thorn0 authored and heathkit committed Nov 15, 2016
1 parent f4843d1 commit 10d84ff
Showing 1 changed file with 2 additions and 23 deletions.
25 changes: 2 additions & 23 deletions lib/element.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,29 +17,8 @@ let WEB_ELEMENT_FUNCTIONS = [
'getInnerHtml', 'getId', 'getRawId', 'serialize', 'takeScreenshot'
];

// Explicitly define webdriver.WebElement.
// TODO: extend WebElement from selenium-webdriver typings
export class WebdriverWebElement {
getDriver: () => WebDriver;
getId: () => wdpromise.Promise<any>;
getRawId: () => wdpromise.Promise<string>;
serialize: () => wdpromise.Promise<any>;
findElement: (subLocator: Locator) => wdpromise.Promise<any>;
click: () => wdpromise.Promise<void>;
sendKeys: (...args: (string|wdpromise.Promise<string>)[]) => wdpromise.Promise<void>;
getTagName: () => wdpromise.Promise<string>;
getCssValue: (cssStyleProperty: string) => wdpromise.Promise<string>;
getAttribute: (attributeName: string) => wdpromise.Promise<string>;
getText: () => wdpromise.Promise<string>;
getSize: () => wdpromise.Promise<ISize>;
getLocation: () => wdpromise.Promise<ILocation>;
isEnabled: () => wdpromise.Promise<boolean>;
isSelected: () => wdpromise.Promise<boolean>;
submit: () => wdpromise.Promise<void>;
clear: () => wdpromise.Promise<void>;
isDisplayed: () => wdpromise.Promise<boolean>;
takeScreenshot: (opt_scroll?: boolean) => wdpromise.Promise<string>;
}
export class WebdriverWebElement {}
export interface WebdriverWebElement extends WebElement {}

/**
* ElementArrayFinder is used for operations on an array of elements (as opposed
Expand Down

0 comments on commit 10d84ff

Please sign in to comment.