Bug 772227: renaming display to is_displayed to align with Selenium API r=jgriffin

This commit is contained in:
David Burns 2012-07-11 05:30:46 -07:00
parent aeda49b01d
commit 7d4d112fb2
2 changed files with 5 additions and 5 deletions

View File

@ -61,7 +61,7 @@ class HTMLElement(object):
def enabled(self):
return self.marionette._send_message('isElementEnabled', 'value', element=self.id)
def displayed(self):
def is_displayed(self):
return self.marionette._send_message('isElementDisplayed', 'value', element=self.id)

View File

@ -18,9 +18,9 @@ class TestState(MarionetteTestCase):
test_html = self.marionette.absolute_url("test.html")
self.marionette.navigate(test_html)
l = self.marionette.find_element("name", "myCheckBox")
self.assertTrue(l.displayed())
self.assertTrue(l.is_displayed())
self.marionette.execute_script("arguments[0].hidden = true;", [l])
self.assertFalse(l.displayed())
self.assertFalse(l.is_displayed())
class TestStateChrome(MarionetteTestCase):
def setUp(self):
@ -48,8 +48,8 @@ class TestStateChrome(MarionetteTestCase):
def test_isDisplayed(self):
l = self.marionette.find_element("id", "textInput")
self.assertTrue(l.displayed())
self.assertTrue(l.is_displayed())
self.marionette.execute_script("arguments[0].hidden = true;", [l])
self.assertFalse(l.displayed())
self.assertFalse(l.is_displayed())
self.marionette.execute_script("arguments[0].hidden = false;", [l])