Skip to content

Commit fea3706

Browse files
committed
fix: change timeout per char
1 parent ddeed7b commit fea3706

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/tools/input.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -160,11 +160,10 @@ async function fillFormElement(
160160
await selectOption(handle, aXNode, value);
161161
} else {
162162
// Increase timeout for longer input values.
163-
const textLengthIn1kChars = Math.floor(value.length / 1_000);
164-
const timeoutPer1kChars = 5_000; // ms
163+
const timeoutPerChar = 10; // ms
165164
const fillTimeout =
166165
context.getSelectedPage().getDefaultTimeout() +
167-
textLengthIn1kChars * timeoutPer1kChars;
166+
value.length * timeoutPerChar;
168167
await handle.asLocator().setTimeout(fillTimeout).fill(value);
169168
}
170169
} finally {

0 commit comments

Comments
 (0)