function wait_for_element(splash,css,timeout,poll_interval) if timeout == nil then timeout = 10 end poll_interval=0.5 return splash:with_timeout ( function() while not splash:select(css) do assert(splash:wait(poll_interval)) end end, timeout) end
the function runs until it times out even though the condition is met within a few seconds
function wait_for_element(splash,css,timeout,poll_interval) if timeout == nil then timeout = 10 end poll_interval=0.5 return splash:with_timeout ( function() while not splash:select(css) do assert(splash:wait(poll_interval)) end end, timeout) end
the function runs until it times out even though the condition is met within a few seconds