mirror of
https://github.com/element-hq/element-web
synced 2024-11-24 10:15:43 +03:00
no need to double select here, might speed things up slightly
This commit is contained in:
parent
aaa5ee1a25
commit
2a7438e9fb
1 changed files with 3 additions and 4 deletions
|
@ -133,9 +133,8 @@ module.exports = class RiotSession {
|
|||
return this.page.$(selector);
|
||||
}
|
||||
|
||||
async waitAndQuery(selector, timeout = 500) {
|
||||
await this.page.waitForSelector(selector, {visible: true, timeout});
|
||||
return await this.query(selector);
|
||||
waitAndQuery(selector, timeout = 500) {
|
||||
return this.page.waitForSelector(selector, {visible: true, timeout});
|
||||
}
|
||||
|
||||
queryAll(selector) {
|
||||
|
@ -143,7 +142,7 @@ module.exports = class RiotSession {
|
|||
}
|
||||
|
||||
async waitAndQueryAll(selector, timeout = 500) {
|
||||
await this.page.waitForSelector(selector, {visible: true, timeout});
|
||||
await this.waitAndQuery(selector, timeout);
|
||||
return await this.queryAll(selector);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue