Skip to content

Commit 385d4ef

Browse files
committed
bug: pass options to waitForActionable to override timeout
Signed-off-by: Gordon Franke <info@nevalon.de>
1 parent 37a6f23 commit 385d4ef

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/Locator/Locator.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,10 @@ public function getOptions(): array
9696
/**
9797
* @param array<string, mixed>|ClickOptions $options
9898
*/
99-
public function click(array|ClickOptions $options = []): void
99+
public function click(array|ClickOptions $options = [], int $waitForActionableTimeout = 30000): void
100100
{
101101
$options = ClickOptions::from($options);
102-
$this->waitForActionable();
102+
$this->waitForActionable(['timeout' => $waitForActionableTimeout]);
103103
$this->sendCommand('locator.click', ['options' => $options->toArray()]);
104104
}
105105

@@ -412,10 +412,10 @@ public function setInputFiles(string|array $files, array|SetInputFilesOptions $o
412412
/**
413413
* @param array<string, mixed>|FillOptions $options
414414
*/
415-
public function fill(string $value, array|FillOptions $options = []): void
415+
public function fill(string $value, array|FillOptions $options = [], int $waitForActionableTimeout = 30000): void
416416
{
417417
$options = FillOptions::from($options);
418-
$this->waitForActionable();
418+
$this->waitForActionable(['timeout' => $waitForActionableTimeout]);
419419
$this->sendCommand('locator.fill', ['value' => $value, 'options' => $options->toArray()]);
420420
}
421421

@@ -477,10 +477,10 @@ public function hover(array|HoverOptions $options = []): void
477477
*
478478
* @param array<string, mixed>|DragToOptions $options
479479
*/
480-
public function dragTo(LocatorInterface $target, array|DragToOptions $options = []): void
480+
public function dragTo(LocatorInterface $target, array|DragToOptions $options = [], int $waitForActionableTimeout = 30000): void
481481
{
482482
$options = DragToOptions::from($options);
483-
$this->waitForActionable();
483+
$this->waitForActionable(['timeout' => $waitForActionableTimeout]);
484484

485485
$targetSelector = $target->getSelector();
486486

0 commit comments

Comments
 (0)