[Checkins] SVN: gocept.selenium/trunk/ Add `getLocation` API.
Christian Theune
ct at gocept.com
Fri Jan 22 07:02:45 EST 2010
Log message for revision 108389:
Add `getLocation` API.
Changed:
U gocept.selenium/trunk/CHANGES.txt
U gocept.selenium/trunk/src/gocept/selenium/selenese.py
U gocept.selenium/trunk/src/gocept/selenium/ztk/tests/test_selenese.py
-=-
Modified: gocept.selenium/trunk/CHANGES.txt
===================================================================
--- gocept.selenium/trunk/CHANGES.txt 2010-01-22 04:32:28 UTC (rev 108388)
+++ gocept.selenium/trunk/CHANGES.txt 2010-01-22 12:02:44 UTC (rev 108389)
@@ -4,7 +4,8 @@
0.3.1 (unreleased)
------------------
-- Nothing changed yet.
+- API expansion: add `getLocation` to retrieve currently loaded URL in
+ browser.
0.3 (2010-01-12)
Modified: gocept.selenium/trunk/src/gocept/selenium/selenese.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/selenese.py 2010-01-22 04:32:28 UTC (rev 108388)
+++ gocept.selenium/trunk/src/gocept/selenium/selenese.py 2010-01-22 12:02:44 UTC (rev 108389)
@@ -215,6 +215,10 @@
def isTextPresent(self, pattern):
pass
+ @passthrough
+ def getLocation(self):
+ pass
+
# Assertions
def assertTextPresent(self, pattern):
Modified: gocept.selenium/trunk/src/gocept/selenium/ztk/tests/test_selenese.py
===================================================================
--- gocept.selenium/trunk/src/gocept/selenium/ztk/tests/test_selenese.py 2010-01-22 04:32:28 UTC (rev 108388)
+++ gocept.selenium/trunk/src/gocept/selenium/ztk/tests/test_selenese.py 2010-01-22 12:02:44 UTC (rev 108389)
@@ -84,7 +84,7 @@
def test_pause(self):
start = time.time()
self.selenium.pause(5000)
- if time.time()-start < 4:
+ if time.time() - start < 4:
self.fail('Pause did not pause long enough')
def test_deleteCookie_smoke(self):
@@ -101,3 +101,9 @@
def test_fireEvent_smoke(self):
self.selenium.fireEvent('css=body', 'click')
+
+ def test_location(self):
+ self.selenium.open('/')
+ self.assertEquals(
+ 'http://localhost:8087/',
+ self.selenium.getLocation())
More information about the checkins
mailing list