Skip to content

include facility for managing selenium process #173

@eflister

Description

@eflister

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
      ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions