[cl-selenium-cvs] CVS cl-selenium

mkennedy mkennedy at common-lisp.net
Wed Jul 2 03:33:12 UTC 2008


Update of /project/cl-selenium/cvsroot/cl-selenium
In directory clnet:/tmp/cvs-serv11275

Modified Files:
	selenium.lisp selenium.asd packages.lisp iedoc.lisp ChangeLog 
Log Message:
Add convenience method with-selenium-session.
Update driver URL to be Selenium RC default.


--- /project/cl-selenium/cvsroot/cl-selenium/selenium.lisp	2008/07/01 06:53:30	1.4
+++ /project/cl-selenium/cvsroot/cl-selenium/selenium.lisp	2008/07/02 03:33:12	1.5
@@ -25,3 +25,13 @@
            (cons `("sessionId" . ,session)
                  (marshall-request "testComplete"))))
 
+(defmacro with-selenium-session ((var browser url) &body body)
+  "Evaluate BODY within a Selenium RC session specified by VAR.
+Once the body is evaluated, the test complete command is sent which
+closes the session and browser."
+  `(let ((,var (do-get-new-browser-session ,browser ,url)))
+     (unwind-protect
+          (progn
+            , at body)
+       (when ,var
+         (do-test-complete ,var)))))
--- /project/cl-selenium/cvsroot/cl-selenium/selenium.asd	2008/01/20 20:01:43	1.1.1.1
+++ /project/cl-selenium/cvsroot/cl-selenium/selenium.asd	2008/07/02 03:33:12	1.2
@@ -1,3 +1,4 @@
+
 (defpackage #:selenium-system (:use #:common-lisp #:asdf))
 (in-package #:selenium-system)
 
--- /project/cl-selenium/cvsroot/cl-selenium/packages.lisp	2008/01/24 15:40:40	1.2
+++ /project/cl-selenium/cvsroot/cl-selenium/packages.lisp	2008/07/02 03:33:12	1.3
@@ -1,3 +1,4 @@
+
 (defpackage #:selenium
   (:use #:common-lisp)
   (:documentation "An interface to Selenium Remote Control.")
@@ -8,4 +9,5 @@
    #:do-test-complete
    #:base-error
    #:http-error
-   #:execution-error))
+   #:execution-error
+   #:with-selenium-session))
--- /project/cl-selenium/cvsroot/cl-selenium/iedoc.lisp	2008/07/01 06:53:30	1.4
+++ /project/cl-selenium/cvsroot/cl-selenium/iedoc.lisp	2008/07/02 03:33:12	1.5
@@ -1,3 +1,4 @@
+
 (in-package #:selenium)
 
 (defclass iedoc-function ()
@@ -175,7 +176,7 @@
 
 #+nil (mapcar #'convert-function (parse-iedoc #p"/home/mkennedy/src/cl-selenium/iedoc-0.8.3-1879.xml"))
 
-(defvar *selenium-driver-url* (puri:parse-uri "http://localhost:9999/selenium-server/driver/")
+(defvar *selenium-driver-url* (puri:parse-uri "http://localhost:4444/selenium-server/driver")
   "The URL of the Selenium Remote Control server.")
 
 (defvar *selenium-session* nil
--- /project/cl-selenium/cvsroot/cl-selenium/ChangeLog	2008/07/01 06:53:30	1.4
+++ /project/cl-selenium/cvsroot/cl-selenium/ChangeLog	2008/07/02 03:33:12	1.5
@@ -1,5 +1,10 @@
 2008-07-01  Matthew Kennedy
 
+	* selenium.lisp (with-selenium-session): New convenience method.
+	* iedoc.lisp (*selenium-driver-url*): Change value to Selenium RC default.
+
+2008-07-01  Matthew Kennedy
+
 	* iedoc.lisp (marshall-request): Change the result to an
 	associative list of parameters which can be passed to Drakma's
 	http-request function.  This way we don't have to do our own URL




More information about the Cl-selenium-cvs mailing list