Files
rust-discovery/deploy/browser/review-data.cjs
T

17 lines
545 B
JavaScript

// Read the data shown by the interactive dev/test WebUI.
async function technicalData(region, label) {
const summary = region.getByText(label, { exact: true });
const pre = region.getByLabel(label, { exact: true });
await summary.waitFor();
if (!await pre.isVisible()) await summary.click();
await pre.waitFor();
return pre;
}
async function readTechnicalData(region, label) {
const data = await technicalData(region, label);
return JSON.parse(await data.innerText());
}
module.exports = { technicalData, readTechnicalData };