On Ubuntu 14.04, I need to start a headless instance of chromium and navigate to a page (no HTML, merely Javascript) that waits messages from a peer (a Websocket server relays the messages). On message reception of a relayed message from the peer, this headless client will run some javascript logic.
So I need this headless chromium to be running all the time my machine is up. I may refresh the page to reset it's state, but this is it.
I was able to start a headless chromium using Xvfb, I am just wondering if using this wrapper won't give more flexibility, in case I want to actually script some actions.
I know I know, Selenium is meant for automating test suites, but is there a way to use xvfbwrapper
+selenium
for bringing up a headless client page? how?
My problem is that this will return as soon as the page is loaded ... and then my script ends
driver.get("http://somedomain/url")
I want my headless chromium to remain up until I decide to kill the script.
I may implement a loop, but I am trying to figure out a smart way that won't peg the CPU.