Skip to content

Commit

Permalink
Correcting test details for python
Browse files Browse the repository at this point in the history
Signed-off-by: AutomatedTester <dburns@mozilla.com>
  • Loading branch information
intchanter authored and AutomatedTester committed Mar 15, 2013
1 parent d6df783 commit 50b9611
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions py/test/selenium/webdriver/common/api_example_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,15 +230,16 @@ def testMoveWindowPosition(self):
loc = self.driver.get_window_position()
# note can't test 0,0 since some OS's dont allow that location
# because of system toolbars
newLoc = [50,50]
if loc['x'] == 50:
newLoc[0] = 60
if loc['y'] == 50:
newLoc[1] = 60
self.driver.set_window_position(newLoc[0], newLoc[1])
new_x = 50
new_y = 50
if loc['x'] == new_x:
new_x += 10
if loc['y'] == new_y:
new_y += 10
self.driver.set_window_position(new_x, new_y)
loc = self.driver.get_window_position()
self.assertEquals(loc['x'], newLoc[0])
self.assertEquals(loc['y'], newLoc[1])
self.assertEquals(loc['x'], new_x)
self.assertEquals(loc['y'], new_y)

def testChangeWindowSize(self):
self._loadPage("blank")
Expand Down
2 changes: 1 addition & 1 deletion py/test/selenium/webdriver/common/webserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def stop(self):
try:
# This is to force stop the server loop
urllib.URLopener().open("http://localhost:%d" % self.port)
except Exception:
except IOError:
pass
LOGGER.info("Shutting down the webserver")
self.thread.join()
Expand Down

0 comments on commit 50b9611

Please sign in to comment.