Sha256: b3be1121c92bd4d26a5b7c193372d02b0ad59bfc43b90ca271fe312b2afc884e
Contents?: true
Size: 774 Bytes
Versions: 44
Compression:
Stored size: 774 Bytes
Contents
module Perus::Pinger class ChromeNavigate < ChromeCommand description 'Changes the URL of the top Chrome window to "url"' option :url def run result = false command = '{"id":1,"method":"Page.navigate","params":{"url":"' + options.url + '"}}' execute([command]) do |message| if message.include?('id') && message['id'] == 1 if message.include?('result') result = true 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