sensiolabs / BehatPageObjectExtension

MIT License
117 stars 48 forks source link

fatal-error-uncaught-argument count error #131

Closed andrew0071 closed 4 years ago

andrew0071 commented 4 years ago

See more details here https://stackoverflow.com/questions/59802060/php-behat-page-object-extension-fatal-error-uncaught-argumentcounterror

jakzal commented 4 years ago

Your behat.yml has messed up indentation. You'll need to fix that.

There's no problem with the page object extension.

jakzal commented 4 years ago

If you'd like to look at a working example, check this out: https://github.com/jakzal/behat-from-scratch/tree/behat-3-page-object-extension

andrew0071 commented 4 years ago

Thanks :)

Note to self indentation in the yml is important 💃

Is it straight forward to integrate selenium2 and the browser_stack driver? When I add @javascript to the feature scenario google launchers but the following is not working as expected

$title = $this->find('css', 'title');

        if (null === $title || 'Google' !== $title->getText()) {
            throw new UnexpectedPageException('Expected to be on a google homepage');
        } 
andrew0071 commented 4 years ago

Thanks again for the github, i'm coming from Specflow, C# background so trying to understand how this all fits...

jakzal commented 4 years ago

Unfortunately the example project I gave you loads google, who might serve a different content to a fully featured browser (i.e. selenium). Might be a reason why you're getting an error.