mirror of https://github.com/zulip/zulip.git
puppeteer_lib: Supply missing $eval arugment.
Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
parent
72142273c0
commit
ad540dac3a
|
@ -117,11 +117,15 @@ class CommonUtils {
|
|||
const name_selector = `${form_selector} [name="${name}"]`;
|
||||
const value = params[name];
|
||||
if (typeof value === "boolean") {
|
||||
await page.$eval(name_selector, (el, value) => {
|
||||
if (el.checked !== value) {
|
||||
el.click();
|
||||
}
|
||||
});
|
||||
await page.$eval(
|
||||
name_selector,
|
||||
(el, value) => {
|
||||
if (el.checked !== value) {
|
||||
el.click();
|
||||
}
|
||||
},
|
||||
value,
|
||||
);
|
||||
} else if (await is_dropdown(page, name)) {
|
||||
await page.select(name_selector, params[name]);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue