Replies: 2 comments
-
I guess there is no way ferrum can do that. It works within a "html internet browsing window" that is a one component of the browser while devtools are another component. I suppose to automate such things you have to talk to your OS, send the keystrokes on the OS level and screenshot on the OS level. |
Beta Was this translation helpful? Give feedback.
-
Everything said by Victor sounds correct and reasonable to me. I guess it's out of scope os this project. |
Beta Was this translation helpful? Give feedback.
-
I just discovered the project this afternoon. Thank you - saves me from having to do a bunch of ugly hand crafted calls!
I've got a few interrelated questions - if these should be broken as separate issues, please let me know.
I'm trying to launch the developer tools, and other functions without any success.
browser.keyboard.type [:ctrl, :shift, 'I']
-- no developer toolsbrowser.keyboard.type [:ctrl, 'u']
-- no source code tab launchedWhen I manually launch the developer tools by interacting with the browser, and then:
browser.screenshot path: 'page.png'
-- screenshots the base page, but does not include the developer tools sidebar
browser.screenshot path: 'page_full.png', full:true
-- causes the browser window to paint to the entire screen, but no additional info (titlebar, or developer tools sidebar)
[set longer timeout to get results, because of long full page redraw via X]
Some of this could be due to the environment, but before going down the path of moving code around, I wanted to check expectations.
My environment (perhaps a bit more than is relevant, but just in case):
browser = Ferrum::Browser.new(url: 'http://localhost:9223')
=> Linux chromium listening on 9222.browser
object activities is coming back to the Mac via X11.Sure, I could have started with something easier, but what's the fun in that...
But it shows why your project is so intriguing!
I did try simplifying by running everything natively on the Mac, but with the same results.
Thanks, and Best Regards,
Paul
[ Also - I'm looking through the docs here: https://chromedevtools.github.io/devtools-protocol/ because I realize that some of this functionality is really tied to the core, rather than what you are exposing via the Ruby interface. Just hoping you might have already explored these areas, and have some insights. ]
Beta Was this translation helpful? Give feedback.
All reactions