コード例 #1
0
 def test_multiple_elements(self):
     test_list = ['one string', 'another string']
     se = SeleniumElement(test_list, 'selector')
     self.assertEquals(se.replace('one', 'two'), 'two string')
     for i, elem in enumerate(se):
         self.assertEquals(elem, test_list[i])
コード例 #2
0
ファイル: sugar.py プロジェクト: gothos/germanium
 def xpath(self, selector):
     return SeleniumElement(self.driver.find_elements_by_xpath(selector),
                            selector)
コード例 #3
0
 def test_no_element_exception(self):
     se = SeleniumElement([], 'selector')
     with self.assertRaises(NoElementException):
         se.replace('one', 'two')
コード例 #4
0
ファイル: sugar.py プロジェクト: gothos/germanium
 def css(self, selector):
     return SeleniumElement(
         self.driver.find_elements_by_css_selector(selector), selector)
コード例 #5
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 def test_no_element_exception(self):
     se = SeleniumElement([], "selector")
     with self.assertRaises(NoElementException):
         se.replace("one", "two")
コード例 #6
0
ファイル: allPythonContent.py プロジェクト: Mondego/pyreco
 def test_multiple_elements(self):
     test_list = ["one string", "another string"]
     se = SeleniumElement(test_list, "selector")
     self.assertEquals(se.replace("one", "two"), "two string")
     for i, elem in enumerate(se):
         self.assertEquals(elem, test_list[i])
コード例 #7
0
ファイル: tests.py プロジェクト: Atala/django-selenium
 def test_multiple_elements(self):
     test_list = ['one string', 'another string']
     se = SeleniumElement(test_list, 'selector')
     self.assertEquals(se.replace('one', 'two'), 'two string')
     for i, elem in enumerate(se):
         self.assertEquals(elem, test_list[i])
コード例 #8
0
ファイル: tests.py プロジェクト: Atala/django-selenium
 def test_no_element_exception(self):
     se = SeleniumElement([], 'selector')
     with self.assertRaises(NoElementException):
         se.replace('one', 'two')