Skip to content
This repository has been archived by the owner on Sep 3, 2024. It is now read-only.

Commit

Permalink
Add pause param to waitAndSetValue
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-darsow committed Nov 27, 2023
1 parent fc9a100 commit 51c5261
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions runtime/helpers/waitHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -233,13 +233,13 @@ async function waitUntilScriptResultIsTrue(script, timeoutMsg, timeout = pageLoa
);
}

async function waitAndSetValue(selectorOrElement, value, timeout = setValueTimeout) {
async function waitAndSetValue(selectorOrElement, value, pause = 200) {
await waitUntilElementIsVisible(selectorOrElement);
const element = await waitUntilElementIsEnabled(selectorOrElement);
await element.clearValue();
await element.click();
driver.keys(value);
await driver.pause(200);
await driver.pause(pause);
}

async function waitUntilElementAttributeEquals(
Expand Down Expand Up @@ -333,10 +333,6 @@ async function waitUntilPageTitleEquals(expectedTitle, timeout = titleTimeout) {
}
}

async function wait(timeout = setValueTimeout) {
await driver.pause(timeout);
}

module.exports = {
waitUntilElementIsPresent,
waitUntilElementIsNotPresent,
Expand All @@ -358,5 +354,4 @@ module.exports = {
waitUntilPageTitleContains,
waitUntilPageTitleEquals,
waitUntilNuxtClientLoads,
wait,
};

0 comments on commit 51c5261

Please sign in to comment.