Skip to content

Commit

Permalink
[6.x] Add waitForInput (#960)
Browse files Browse the repository at this point in the history
* add waitForInput

* Update WaitsForElements.php

Co-authored-by: Taylor Otwell <[email protected]>
  • Loading branch information
SjorsO and taylorotwell authored Feb 1, 2022
1 parent 45c1005 commit 7832fba
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Concerns/WaitsForElements.php
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,18 @@ public function waitForLink($link, $seconds = null)
}, $message);
}

/**
* Wait for an input field to become visible.
*
* @param string $field
* @param int|null $seconds
* @return $this
*/
public function waitForInput($field, $seconds = null)
{
return $this->waitFor("input[name='{$field}'], textarea[name='{$field}'], select[name='{$field}']", $seconds);
}

/**
* Wait for the given location.
*
Expand Down

0 comments on commit 7832fba

Please sign in to comment.