symfony / panther

A browser testing and web crawling library for PHP and Symfony
MIT License
2.91k stars 213 forks source link

google account sign in button click not working #572

Open Kronenu opened 1 year ago

Kronenu commented 1 year ago

I'm working on a test script using PHP and Panther which requires me to first login to my Google account to then access my app. I've tried a whole bunch of different ways of getting the script to click on the Next button during sign-in:

3C938906-2D12-432E-BD4A-ACDC4A4CE703

The button html for the Next button is the following:

8D926C11-5547-413E-B7EE-8A43B2788F9E

This is my script with Panther:

`use Symfony/Component/Panther/Client; require DIR.'vendor/autoload.php';

$client = Client::createFirefoxClient; $client->request('GET' 'https://accounts.google.com/ServiceLogin?service=mail&passive=true&Email=example@domain.com'); $client->executeScript('document.querySelector('VfPpkd-LgbsSe').click(); $client->quite();`

The script executes without any error but in no_headless the button never gets clicked and I'm not able to proceed. Any thoughts and ideas on what I'm doing wrong here?

Thanks for the help in advance.

shadydealer commented 1 year ago

Is the button inside an iframe? If so, you would need to follow the steps explained in https://github.com/symfony/panther/issues/446#issuecomment-806621843

and then attempt to click the button.