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
I'm using the isOpen method (from SensioLabs\Behat\PageObjectExtension\PageObject\Page class) like this:
PHPUnit_Framework_Assert::assertTrue(
$this->getPage('Home page')->isOpen(),
'Home page is not open'
);
The problem is that when the page fails to open I have no clue why, just my generic message 'Home page is not open'. This is because isOpen method is catching all the exceptions thrown during verification (and their useful messages).
I did a workaround and overrode the isOpen method without the try/catch, but, from my point of view Page public interface should provide this.
What do you think?
Thanks!
The text was updated successfully, but these errors were encountered:
I usually implement an after step hook, which outputs html on failed step (or part of it, or a screenshot if driver supports it). Would a built in support for this kind of thing solve your problem?
Well, it would definitely help for most of the cases. In my case, what was 'failing' was that the url was different after attempting to submit a form with non valid data, so the wonderful message thrown by the verifyUrl method was lost.
I did a workaround by overriding the isOpen method in my BasePage class as follows:
@jakzal Yes, build-in support would be the best idea rather than adding this step manually to all projects and/or base pages. Debugging while errors are hidden is almost impossible.
Hi,
I'm using the isOpen method (from SensioLabs\Behat\PageObjectExtension\PageObject\Page class) like this:
The problem is that when the page fails to open I have no clue why, just my generic message
'Home page is not open'
. This is because isOpen method is catching all the exceptions thrown during verification (and their useful messages).I did a workaround and overrode the isOpen method without the try/catch, but, from my point of view Page public interface should provide this.
What do you think?
Thanks!
The text was updated successfully, but these errors were encountered: