New patches: [unrevert anonymous**20070922001126] < > { hunk ./Selenium/Interactive.hs 1 -module Selenium.Interactive (start, stop) where - -import Control.Monad.Error -import Data.Maybe -import Network.BSD -import Network.URI - -import Selenium.Server - --- | Starts up a session and returns a wrapper function that will run --- commands. -start url = do - host <- getHostName - let uri = fromJust (parseURI url) - sel = mkSeleniumRCSession host Firefox uri - result <- runSelenium sel startSelenium - return $ runSelenium (either (error "connection failed") id result) - --- | Stops a session (in the wrapper returned by start) -stop = stopSelenium rmfile ./Selenium/Interactive.hs hunk ./tests/well-typed 6 # check the library type checks on each commit echo -n "Testing type correctness ... " -result=`echo ":q" | ghci -v0 -fglasgow-exts Selenium/*.hs 2>&1` +result=`echo ":q" | ghci -v0 -fglasgow-exts Selenium/Server.hs 2>&1` if [ -z "$result" ] ; then echo "well typed!" } Context: [Added a module to facilitate interactive experiments. Aaron Tomb **20070922000401 It provides a 'start' function that creates a session and returns a wrapper function that you can run Selenium commands inside. So now you can do something like this in ghci: > s <- start "http://www.example.com" > s $ open "http://www.example.com" > s $ click "link=foo" > s $ isTextPresent "something" ] [Made commit check even better. Aaron Tomb **20070922000348] [Made commit check cover HUnit as well. Aaron Tomb **20070921235837] [Fixed HUnit module to deal with runSeleniumReader. Aaron Tomb **20070921235812] [Put runSeleniumReader back in. *sigh* Aaron Tomb **20070921235619] [Whitespace only. Aaron Tomb **20070921184320] [Server changed to use Selenium.Pretty Aaron Tomb **20070921184246] [remove module names for examples, so they run in runhaskell Don Stewart **20070921184843] [add note on how to get an example running Don Stewart **20070921184621] [Added a couple of new command functions. Aaron Tomb **20070921182716] [Updated README with Selenium 0.9.2 Aaron Tomb **20070921182654] [Moved around Maybes to do better error handling. Aaron Tomb **20070921003447] [elaborate test sciprt Don Stewart **20070920231922] [Fixed type signatures. Aaron Tomb **20070920232217] [check type correctness on each commit Don Stewart **20070920231244] [some pretty printer combinators, and check the lib typechecks on every commit Don Stewart **20070920230608] [add todo file Don Stewart **20070920225847] [add author info Don Stewart **20070920214411] [Comments and whitespace for 0.1 release. Aaron Tomb **20070920183226] [Modified withSelenium to return IO (Either String a) Aaron Tomb **20070920182521] [Added some data types for locators and coordinates. Aaron Tomb **20070920000555] [Comments only. Aaron Tomb **20070919204914] [Added another test harness, alternative to HUnit. Aaron Tomb **20070919172254] [Resolved merge conflicts and associated type errors. Aaron Tomb **20070918234145] [move Base -> Syntax, SeleniumRC -> Server Don Stewart **20070918223442] [just refactoring Don Stewart **20070918222009] [port to Selenium monad Don Stewart **20070918205718] [Use newtype for Selenium monad. Separates layers better. SeleniumMonad is now Selenium Don Stewart **20070918183642] [Improve HUnit tests; fix imports, Cabal, and examples. Aaron Tomb **20070918233506] [Minor change to Cabal file. Aaron Tomb **20070918232400] [Added HUnit module. Aaron Tomb **20070918232342] [Extended README to describe how to get Selenium. Aaron Tomb **20070918220052] [Added example file for real. Aaron Tomb **20070918190127] [Added some small examples. Aaron Tomb **20070918184750] [Removed "THE REGENTS" from license file. Aaron Tomb **20070918184101] [more text Don Stewart **20070918180215] [add readme Don Stewart **20070918175820] [whitespace only Don Stewart **20070918172825] [add license file Don Stewart **20070918172329] [Expand the .cabal file slightly Don Stewart **20070918164704] [Changed SeleniumMonad to be a Reader with a session. Aaron Tomb **20070918002048] [Many improvements. Aaron Tomb **20070917205215 * Made a SeleniumMonad type (currently for error handling, later for implicit sessions) * Added descriptive header comments and some Haddock markup. I need to record more often. ] [Refactoring Base/RC separation. Aaron Tomb **20070910175626 * Renamed HTTP.hs to SeleniumRC.hs * Moved some stuff from Base.hs to SeleniumRC.hs * Removed SeleniumResult type class; it was overkill. ] [Fixed GHC warnings. Aaron Tomb **20070907001048] [Added show for missing commands. Minor other fixes. Aaron Tomb **20070906225942] [Initial darcs import. Aaron Tomb **20070906002637] Patch bundle hash: 42ac5681fc1dc5fc25eb89ed86dd0d6f36a5fa46