Send Hotkey not working for headless browser -- possible work arounds?

Hey everyone,

My goal is to save a webpage from the Chrome Browser in headless mode.

I am running the Chrome webdriver to open the page, but when I try using the send hotkey activity I get this error,

“Send Hotkey: A browser started by WebDriver in headless mode does not support this kind of operation.”

What are some potential work arounds for this issue since the send hotkey activity does not work with webdrivers?

Hello,

If you are using a type into activity you could send the hotkey through that. For example hot key “enter” is written as “[k(enter)]”, which could be added after your string. Unfortunately this requires that SimulateType is not activated, otherwise the hotkey will not be recognized and seems to work better with SendWindowMessages activated. I am unsure if that is feasible in your implementation, but this is another way to send hot keys

I’ll give that a shot. It’s a good place to start. What would ctrl+s look like as a written hotkey?

And thanks for the quick response!

I see, you are trying to send the hotkey to the page, not into a text field, this might be more difficult then. However you could still try using something like this to send a hotkey through a type into activity and see if it works:

“[d(ctrl)]s[u(ctrl)]”

Where [d(ctrl)] is for pressing down ctrl, the followed by the secondary key, and finally the [u(ctrl)] is for the release of ctrl

As seen in this post:

Tried this out and it didn’t work, but thanks for the time and help. I really appreciate it!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.