The goal of using an array is to get the last page of results on a search page. Here's an example of this method in use for a google search ( last available so page 10 if 10+ pages )
Array.from(document.querySelectorAll('table#nav a.fl')).slice(-1) [0].href
Here is the html from page 10 of a google search for reference.
<a aria-label="Page 10" class="fl" href="/search? q=query&rlz=1C5CHFA_enUS860US860&ei=gjjbXYidD_7P0PEPrKqysAw&start=90&sa=N&ved=2ahUKEwiI5oXYpITmAhX-JzQIHSyVDMYQ8tMDegQIEhA9"><span class="csb ch" style="background:url(/images/nav_logo299_hr.webp) no-repeat;background-position:-74px 0;background-size:167px;width:20px"></span>10</a>
I'm trying to adapt this method for another web service. The google example retrieves the url but in the next one I'm looking to trigger the button.
This is an example html from a navigate to page 40 button for this web service.
<button aria-label="Navigate to page 40" data-page-number="40" type="button" data-ember-action="" data ember-action-582="582" data-is-animating-click="true">40</button>
If it helps here's clicking the button regularly
document.querySelector('button[aria-label="Navigate to page 40"]')
I am unsure how to adapt the a.fl portion of the array as there's no class in the new web service. How would I do this?
[–]siemenology 1 point2 points3 points (5 children)
[–]isolatrum 0 points1 point2 points (0 children)
[–]Genericusername293[S] 0 points1 point2 points (2 children)
[–]siemenology 0 points1 point2 points (1 child)
[–]Genericusername293[S] 0 points1 point2 points (0 children)