Allow custom timeouts on click (#14042) (#14055)

This commit is contained in:
Stacey Gammon 2017-09-19 12:43:25 -04:00 committed by GitHub
parent b3fbb030bc
commit 78707381fd

View file

@ -26,9 +26,9 @@ export function TestSubjectsProvider({ getService }) {
});
}
async click(selector) {
async click(selector, timeout = defaultFindTimeout) {
return await retry.try(async () => {
const element = await this.find(selector);
const element = await this.find(selector, timeout);
await remote.moveMouseTo(element);
await element.click();
});