-
Notifications
You must be signed in to change notification settings - Fork 331
Open
Description
Dusk Version
8.x
Laravel Version
11.x
PHP Version
8.4
PHPUnit Version
10.x
Database Driver & Version
/
Description
Hello 👋,
The method pressAndWaitFor uses the method findButtonByText (
Lines 296 to 309 in ae5a90c
| /** | |
| * Resolve the element for a given button by text. | |
| * | |
| * @param string $button | |
| * @return \Facebook\WebDriver\Remote\RemoteWebElement|null | |
| */ | |
| protected function findButtonByText($button) | |
| { | |
| foreach ($this->all('button') as $element) { | |
| if (Str::contains($element->getText(), $button)) { | |
| return $element; | |
| } | |
| } | |
| } |
For example, you can have the button Create Application and another button Create but you won't be able to target Create because Create Application will always be resolved first (if it appears fist in the DOM).
Steps To Reproduce
- Create a button
Create Application - Create a button
Create - Try to use the method
pressAndWaitForto select theCreatebut Dusk will try to pressCreate Application.
jackbayliss
Metadata
Metadata
Assignees
Labels
No labels