it would be nice to offer a recommended way to automate the selenium process:
withCreateProcess (shell "java -jar selenium-server-standalone-*.jar") {std_err = CreatePipe} $ \_ _ stderr ph -> -- proc denies permission?
flip (maybe $ error "no stderr") stderr $ \s -> do -- is there a way to use the monad instance of maybe instead of explicitly checking?
os <- whileM (catchIOError (hWaitForInput s $ 3*10^3) $ \e -> if isEOFError e then return False else ioError e) $ do -- hIsEOF can block
o <- hGetLine s
putStrLn o
return $ isInfixOf "up and running" o
print os
unless (or os) $ error "selenium didn't start"
runSession (useBrowser chrome defaultConfig) . finallyClose $ do
...
it would be nice to offer a recommended way to automate the selenium process: