MCPcopy Create free account
hub / github.com/ChromeDevTools/devtools-frontend / step

Function step

test/shared/helper.ts:23–37  ·  view source on GitHub ↗
(description: string, step: () => Promise<T>| T)

Source from the content-addressed store, hash-verified

21}
22
23export const step = async<T = unknown>(description: string, step: () => Promise<T>| T): Promise<Awaited<T>> => {
24 try {
25 return await step();
26 } catch (error) {
27 if (error instanceof AssertionError) {
28 throw new AssertionError(
29 `Unexpected Result in Step "${description}"
30 ${error.message}`,
31 error);
32 } else {
33 error.message += ` in Step "${description}"`;
34 throw error;
35 }
36 }
37};
38
39export const selectOption = async (select: puppeteer.ElementHandle<HTMLSelectElement>, value: string) => {
40 await select.evaluate(async (node, _value) => {

Calls

no outgoing calls

Tested by 3

testMessageFilterFunction · 0.68
openAFileWithQuickMenuFunction · 0.68
waitForStateFunction · 0.68