开发者

How do I programatically control a Chrome instance from the command line?

开发者 https://www.devze.com 2022-12-17 07:12 出处:网络
How do I control a running Google Chrome instance fr开发者_如何学编程om the command line?I\'m hoping there\'s something like a -remote flag that will allow me to send in some javascript or somesuch.In

How do I control a running Google Chrome instance fr开发者_如何学编程om the command line? I'm hoping there's something like a -remote flag that will allow me to send in some javascript or somesuch. In particular, I would like to reload the topmost document on the foremost window.

I'm especially interested in Linux/MacOS solutions.


Take a look at http://code.google.com/p/chromedevtools/ . It might be you can use the Debugging Protocol to do the job. There is also an Ruby Client. There is also chromix.


You can use this command line tool if you're on a Mac - it uses the Chrome Scripting API, I guess

https://github.com/prasmussen/chrome-cli

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号