SO-ChatBot icon indicating copy to clipboard operation
SO-ChatBot copied to clipboard

Run headlessly with webdriver

Open BobVul opened this issue 9 years ago • 1 comments

Since Nightmare updated to use Electron (Chromium), it is no longer able to run headlessly without Xvfb.

So let's reimlpement this with WebDriver + PhantomJS! (Another option was pure PhantomJS.)

  • Bot login and running works.
  • Bot 'already logged in' check not tested. It currently doesn't work because cookies are broken in PhantomJS 2.x. Probably could test with Firefox...
  • REPL does not provide response correctly. WebDriver does not provide output. PhantomJS does not correctly clear console logs after fetch, so we can't just dump them to the terminal either (it repeats previously dumped logs).
  • Login probably needs to be tweaked to work on SO chat... SE chat login works differently. I'm not sure if we can safely unify them, since SE chat has a different login mechanism from the rest of the network - and the old Nightmare method of logging into SU, etc., doesn't work reliably because there's a variable wait involved for the StackAuth SSO scripts to load.

BobVul avatar Mar 03 '16 00:03 BobVul

Awesome! I'll look into some of the things you've mentioned.

@rlemon Could you test whether this'd work on your server?

Zirak avatar Mar 03 '16 20:03 Zirak