I have a webpage where the next-page is given as the following: javascript:ctrl.set_pageReload(6) I wanted to know how I would go about clicking on this to get the next page.
I have tried the following lua script:
function main(splash, args)
assert(splash:go(splash.args.url))
local get_dimensions = splash:jsfunc([[
function(){
var rect = document.querySelector("ul[id='paginations_bottom'] li[class='btn-next'] a").getClientRects()[0];
return {"x": rect.left, "y": rect.top}
}
]])
splash:set_viewport_full()
splash:wait(0.1)
local dimensions = get_dimensions()
splash:mouse_click(dimensions.x, dimensions.y)
splash:wait(0.3)
return splash:png()
end
However, it only returns the same page so it's clear to me it's probably not a 'click-able' button, perhaps there's another way to interact with it?
The website url:
https://www.theparking.eu/used-cars/.html