cavalle / chrome_remote Goto Github PK
View Code? Open in Web Editor NEWDISCONTINUED - A client implementation of the Chrome DevTools Protocol in Ruby
License: MIT License
DISCONTINUED - A client implementation of the Chrome DevTools Protocol in Ruby
License: MIT License
Thanks for an awesome gem! ๐
Has there been any discussion between this gem and ferrum, about co-operation?
Both are good and seem to overlap, sometimes more can be achieved by joining forces.
Please update your gem with changes. It need to replace GET request to PUT
response = Net::HTTP.get(options[:host], path, options[:port])
response = JSON.parse(response)
replace to this
http = Net::HTTP.new(options[:host], options[:port])
resp = http.send_request('PUT', path)
response = JSON.parse(resp.body)
with
chrome.on "Overlay.inspectNodeRequested" do ...
I have to
loop do
chrome.send_cmd "Overlay.enable"
sleep 0.1
end
to get the events firing, is this a bug in this gem or is it just how the devtools protocol works?
require "chrome_remote"
chrome = ChromeRemote.client
chrome.send_cmd "Fetch.enable"
chrome.on "Fetch.requestPaused" do |obj|
chrome.send_cmd "Fetch.continueRequest", {
requestId: obj["requestId"]
}
end
chrome.listen
With the above code I eventually get: SystemStackError: stack level too deep
What am I doing wrong?
How can I use 'Page.addScriptToEvaluateOnNewDocument' for all new opened tabs?
If switching to a new tab init user by click link. Or use one injection for all new opened tabs
Currently it's not possible to pass options with wait_for
command.
It will be nice to have this feature, because some of Chrome DevTools Protocol Events can accept options.
For example Page.frameStoppedLoading (can accept frameId
option).
Hi!
Thank you so much for creating this wonderful tool :)
I tried to execute the screenshot example, but unfortunately got an error when running the last line: File.write "screenshot.png", Base64.decode64(response["data"])
Error:
Encoding::UndefinedConversionError: "\x89" from ASCII-8BIT to UTF-8
Would you happen to know what's going on?
Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.