I open a payment form in a window and each time Dusk is struggling to find the input elements on the screen. I have tried adding pause(3)
but that did nothing.
I am running laravel 5.5 and Dusk 2.0.
$browser->waitFor('.stripe-card iframe', 30);
// Lets make the switch to iframe
$browser->driver
->switchTo()
->frame('__privateStripeFrame5');
$browser->type('cardnumber', '4242424242424242')
->type('exp-date', '12 50')
->type('cvc', '123');
I have tried:
- using
->pause(3000)
beforetype('cardnumber')
but did nothing - using
->keys('input[name=cardnumber]', '4242424242424242')
but did nothing
The error that I am given
Facebook\WebDriver\Exception\NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"body textar ea[name='cardnumber']"}
When using keys()
i get: Facebook\WebDriver\Exception\NoSuchElementException: no such element: Unable to locate element: {"method":"css selector","selector":"body input[name=cardnumber]"}
tests/Browser/screenshots
show? – Jonas Staudenmeir->pause(3000)
- the iframe appeared and still the same issue – Vlad Vladimir Hercules