这里有什么问题?我想等待下一个任务,直到我的页面完全加载。问题:没有错误,但驱动程序不等待:-(
# wait for page load
wait2 = Selenium::WebDriver::Wait.new(:timeout => 20) # seconds
count = 0
begin
raise("maximum attempt crossed #{count} times") if count > 3
wait2.until {
self.getDriver.execute_script("return document.readyState;") == "complete"
}
rescue Timeout::Error
count +=1
retry
end
#do sth