Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
async click_toolbar_button(text) {
let button_text, dropdown_item;
if (text.includes(':')) {
[button_text, dropdown_item] = text.split(":")
} else {
button_text = text;
}
await this.click_element('.form-inner-toolbar .btn', button_text);
if (dropdown_item) {
await t.wait(1000);
await t.click_dropdown_item(dropdown_item)
}
},
async wait_for_modal() {
await Selector("body.modal-open");
await t.wait(1000);
},
async pause(time = 1) {
await t.wait(time * 1000);
},
async close_dialog() {
await ClientFunction(() => {
cur_dialog && cur_dialog.cancel();
})();
await t.wait(500);
},