We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17532e7 commit b3d38dbCopy full SHA for b3d38db
src/util/elementsUtil.ts
@@ -36,11 +36,11 @@ export const map = async <T>(
36
elements: WebdriverIO.ElementArray | WebdriverIO.Element[],
37
command: (element: WebdriverIO.Element) => Promise<T>
38
): Promise<T[]> => {
39
- const results: T[] = []
+ const results: Promise<T>[] = []
40
for (const element of elements) {
41
- results.push(await command(element))
+ results.push(command(element))
42
}
43
- return results
+ return await Promise.all(results)
44
45
46
export const toArray = <T>(value: T | T[]): T[] => (Array.isArray(value) ? value : [value])
0 commit comments