Sha256: d6261cd23960da7f983d95462a48f6e63d0f8a7c0c715eff692fbe86c07bdff5
Contents?: true
Size: 983 Bytes
Versions: 44
Compression:
Stored size: 983 Bytes
Contents
module Perus::Pinger class ChromeReload < ChromeCommand description 'Reloads the top Chrome window. When "ignore_cache" is true the effect is equivalent to performing a force reload.' option :ignore_cache, default: false def run result = false execute(['{"id":1,"method":"Page.reload"}']) do |message| if message.include?('id') && message['id'] == 1 if message.include?('result') if message['result'] == {} result = true else result = message['result'].to_s end elsif message.include?('error') result = message['error'].to_s else result = message.to_s end end end result end end end
Version data entries
44 entries across 44 versions & 1 rubygems