зеркало из https://github.com/mozilla/gecko-dev.git
Bug 778094: aligning text method on Marionette Elements with Selenium API; r=jgriffin. DONTBUILD because NPOTB
This commit is contained in:
Родитель
3a15cfbf6b
Коммит
86747606a0
|
@ -43,6 +43,7 @@ class HTMLElement(object):
|
|||
def click(self):
|
||||
return self.marionette._send_message('clickElement', 'ok', element=self.id)
|
||||
|
||||
@property
|
||||
def text(self):
|
||||
return self.marionette._send_message('getElementText', 'value', element=self.id)
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ class TestClear(MarionetteTestCase):
|
|||
self.marionette.navigate(test_html)
|
||||
element = self.marionette.find_element("id","content-editable")
|
||||
element.clear()
|
||||
self.assertEqual("", element.text())
|
||||
self.assertEqual("", element.text)
|
||||
|
||||
def testTextInputShouldNotClearWhenDisabled(self):
|
||||
test_html = self.marionette.absolute_url("test_clearing.html")
|
||||
|
|
|
@ -10,7 +10,7 @@ class TestText(MarionetteTestCase):
|
|||
test_html = self.marionette.absolute_url("test.html")
|
||||
self.marionette.navigate(test_html)
|
||||
l = self.marionette.find_element("id", "mozLink")
|
||||
self.assertEqual("Click me!", l.text())
|
||||
self.assertEqual("Click me!", l.text)
|
||||
|
||||
def test_clearText(self):
|
||||
test_html = self.marionette.absolute_url("test.html")
|
||||
|
@ -46,7 +46,7 @@ class TestTextChrome(MarionetteTestCase):
|
|||
newWin = wins.pop()
|
||||
self.marionette.switch_to_window(newWin)
|
||||
box = self.marionette.find_element("id", "textInput")
|
||||
self.assertEqual("test", box.text())
|
||||
self.assertEqual("test", box.text)
|
||||
|
||||
def test_clearText(self):
|
||||
wins = self.marionette.window_handles
|
||||
|
@ -54,9 +54,9 @@ class TestTextChrome(MarionetteTestCase):
|
|||
newWin = wins.pop()
|
||||
self.marionette.switch_to_window(newWin)
|
||||
box = self.marionette.find_element("id", "textInput")
|
||||
self.assertEqual("test", box.text())
|
||||
self.assertEqual("test", box.text)
|
||||
box.clear()
|
||||
self.assertEqual("", box.text())
|
||||
self.assertEqual("", box.text)
|
||||
|
||||
def test_sendKeys(self):
|
||||
wins = self.marionette.window_handles
|
||||
|
@ -64,6 +64,6 @@ class TestTextChrome(MarionetteTestCase):
|
|||
newWin = wins.pop()
|
||||
self.marionette.switch_to_window(newWin)
|
||||
box = self.marionette.find_element("id", "textInput")
|
||||
self.assertEqual("test", box.text())
|
||||
self.assertEqual("test", box.text)
|
||||
box.send_keys("at")
|
||||
self.assertEqual("attest", box.text())
|
||||
self.assertEqual("attest", box.text)
|
||||
|
|
Загрузка…
Ссылка в новой задаче