You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (Str::contains($element->getText(), $button)) {
return$element;
}
}
}
) that does not try to resolve the button with exactly its name but with a name that contains the parameter. This is an issue when there is multiple button on the page.
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 pressAndWaitFor to select the Create but Dusk will try to press Create Application.
The text was updated successfully, but these errors were encountered:
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 methodfindButtonByText
(dusk/src/ElementResolver.php
Lines 296 to 309 in ae5a90c
For example, you can have the button
Create Application
and another buttonCreate
but you won't be able to targetCreate
becauseCreate Application
will always be resolved first (if it appears fist in the DOM).Steps To Reproduce
Create Application
Create
pressAndWaitFor
to select theCreate
but Dusk will try to pressCreate Application
.The text was updated successfully, but these errors were encountered: