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
22
22
{
23
23
$ currentPage = (int ) $ this ->getHTMLPage ()->find ($ this ->getLocator ('currentPage ' ))->getText ();
24
24
// 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);
26
28
$ this ->getHTMLPage ()
27
29
->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 ' ));
30
31
$ this ->getHTMLPage ()->find ($ this ->getLocator ('nextButton ' ))->click ();
31
32
$ this ->getHTMLPage ()->setTimeout (10 )->waitUntil (function () use ($ currentPage ): bool {
32
33
$ activePge = (int ) $ this ->getHTMLPage ()->find ($ this ->getLocator ('currentPage ' ))->getText ();
You can’t perform that action at this time.
0 commit comments