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])
 def test_no_element_exception(self):
     se = SeleniumElement([], 'selector')
     with self.assertRaises(NoElementException):
         se.replace('one', 'two')
Esempio n. 3
0
 def test_no_element_exception(self):
     se = SeleniumElement([], "selector")
     with self.assertRaises(NoElementException):
         se.replace("one", "two")
Esempio n. 4
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])
Esempio n. 5
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])
Esempio n. 6
0
 def test_no_element_exception(self):
     se = SeleniumElement([], 'selector')
     with self.assertRaises(NoElementException):
         se.replace('one', 'two')