Is there a way to stop loading a page with watir-webdriver on firefox? Or is there a way to force something in my script even if the page is still loading? At a point in my
You can use the Timeout class to force it to give up after waiting a reasonable amount of time (and this is internally how Watir performs it's waits as well)
begin
Timeout::timeout(10) do
# perform actions that may hang here
end
rescue Timeout::Error => msg
put "Recovered from Timeout"
end