title: What would use less RAM and CPU, Selenium and XVFB with IceWeasel or Selenium with PhantomJS on a Raspberry Pi
body: <p>I am planning on running browser automation on my Raspberry Pi Model B, it will be automating submitting forms and clicking on buttons of webpages. I plan to control this from Python as I currently have a working solution using iMacros scripting feature controlling Firefox on a Windows machine.
  (Firefox uses uBlock, NoScript and Memory Fox to reduce RAM)</p>
  
  <p>I want to know what would use the least amount of CPU and RAM, I know that I will have to use a precompiled PhantomJS binary as it would take 2 days to compile. The alternative is to use XVFB and PyVirtualDisplay to run IceWeasel/FireFox.</p>
  
  <p>My bot needs to be able to log into a few websites (only one at a time) with cookies that uses a Captcha upon logging in (by saving a screenshot of the webpage and manually solving it), email verification and save the cookies so it does not need to log in manually each time. (easy if using IceWeasel or FireFox not so easy in PhantomJS). The bot should be able to run for weeks without stopping, so I can't use anything with memory leaks and would like something that could deal with the internet going down.</p>
  
  <p>I would also like the feature to know if the command I send to the browser was completed successfully or not e.g with a try: except: or by the command returning an error code like it does with iMacros.</p>