-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Description
I use this macro to take screenshots of elements in the browser; however, I can't select elements that are inside of iframes.
macro: I screenshot the element {selector} as {name}
steps:
- step: In my browser, I evaluate {js}
js: |-
await toolproof.waitFor(() => document.readyState == 'complete');
await document.fonts.ready;
let status = "Name is OK.";
if ("%name%".indexOf("/") >= 0) {
status = "Name contains a slash but should not."
}
if ("%name%".indexOf("_") >= 0) {
status = "Name contains an underscore but should not."
}
if ("%name%".indexOf(" ") >= 0) {
status = "Name contains a space but should not."
}
toolproof.assert_eq(status, "Name is OK.");
- In my browser, I screenshot the element "%selector%" to "%toolproof_process_directory%/assets%name%.webp"
- macro: Store metadata for "%name%" from "%selector%"
Metadata
Metadata
Assignees
Labels
No labels