File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -22,11 +22,12 @@ public function clickNextButton(): void
2222 {
2323 $ currentPage = (int ) $ this ->getHTMLPage ()->find ($ this ->getLocator ('currentPage ' ))->getText ();
2424 // scroll to the bottom to avoid "Go to top" button
25- $ this ->getHTMLPage ()->executeJavaScript ("document.querySelector('.ibexa-back-to-top-scroll-container').scrollTo(0, document.querySelector('.ibexa-back-to-top-scroll-container').scrollHeight) " );
25+ $ this ->getHTMLPage ()->executeJavaScript (<<<'JS'
26+ document.querySelector('.ibexa-back-to-top-scroll-container') && document.querySelector('.ibexa-back-to-top-scroll-container').scrollTo(0, document.querySelector('.ibexa-back-to-top-scroll-container').scrollHeight);
27+ JS);
2628 $ this ->getHTMLPage ()
2729 ->setTimeout (3 )
28- ->find (new VisibleCSSLocator ('backToTopWithTitle ' , '.ibexa-back-to-top__title--visible ' ))
29- ->assert ()->textEquals ('Go to top ' );
30+ ->findAll (new VisibleCSSLocator ('backToTopWithTitle ' , '.ibexa-back-to-top__title--visible ' ));
3031 $ this ->getHTMLPage ()->find ($ this ->getLocator ('nextButton ' ))->click ();
3132 $ this ->getHTMLPage ()->setTimeout (10 )->waitUntil (function () use ($ currentPage ) {
3233 $ activePge = (int ) $ this ->getHTMLPage ()->find ($ this ->getLocator ('currentPage ' ))->getText ();
You can’t perform that action at this time.
0 commit comments