[Checkins] SVN: gocept.selenium/trunk/ added (assert|waitFor)Element(Width|Height) to the selenese API

Thomas Lotze tl at gocept.com
Wed Aug 11 08:11:13 EDT 2010


Log message for revision 115634:
  added (assert|waitFor)Element(Width|Height) to the selenese API

Changed:
  U   gocept.selenium/trunk/CHANGES.txt
  U   gocept.selenium/trunk/src/gocept/selenium/selenese.py

-=-
Modified: gocept.selenium/trunk/CHANGES.txt
===================================================================
--- gocept.selenium/trunk/CHANGES.txt	2010-08-11 11:45:19 UTC (rev 115633)
+++ gocept.selenium/trunk/CHANGES.txt	2010-08-11 12:11:13 UTC (rev 115634)
@@ -4,7 +4,8 @@
 0.7 (unreleased)
 ----------------
 
-- Nothing changed yet.
+- API expansion: ``assertElementHeight`` and ``assertElementWidth`` along with
+  ``waitFor`` companions
 
 
 0.6 (2010-08-09)

Modified: gocept.selenium/trunk/src/gocept/selenium/selenese.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/selenese.py	2010-08-11 11:45:19 UTC (rev 115633)
+++ gocept.selenium/trunk/src/gocept/selenium/selenese.py	2010-08-11 12:11:13 UTC (rev 115634)
@@ -345,6 +345,18 @@
                 'Element order did not match expected %r,%r'
                 % (locator1, locator2))
 
+    def assertElementWidth(self, locator, width):
+        got = self.getElementWidth(locator)
+        if width != got:
+            raise self.failureException(
+                'Width of %r is %r, expected %r.' % (locator, got, width))
+
+    def assertElementHeight(self, locator, height):
+        got = self.getElementHeight(locator)
+        if height != got:
+            raise self.failureException(
+                'Height of %r is %r, expected %r.' % (locator, got, height))
+
     # Internal
 
     def __getattr__(self, name):



More information about the checkins mailing list