5.3.1+ fixed problem by replacing find_element_by_tag_name with find_elements_by_tag_name
This commit is contained in:
parent
892cdbf541
commit
9bacbfef4c
@ -37,7 +37,7 @@ class NewVisitorTest(unittest.TestCase):
|
|||||||
inputbox.send_keys(Keys.ENTER)
|
inputbox.send_keys(Keys.ENTER)
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
table = self.browser.find_element_by_id('id_list_table')
|
table = self.browser.find_element_by_id('id_list_table')
|
||||||
rows = table.find_element_by_tag_name('tr')
|
rows = table.find_elements_by_tag_name('tr')
|
||||||
# self.assertTrue('1: Buy peacock feathers', [row.text for row in rows])
|
# self.assertTrue('1: Buy peacock feathers', [row.text for row in rows])
|
||||||
|
|
||||||
# There is still a text box inviting her to add another item. She
|
# There is still a text box inviting her to add another item. She
|
||||||
@ -49,7 +49,7 @@ class NewVisitorTest(unittest.TestCase):
|
|||||||
|
|
||||||
# The page updates again, and now shows both items on her list
|
# The page updates again, and now shows both items on her list
|
||||||
table = self.browser.find_element_by_id('id_list_table')
|
table = self.browser.find_element_by_id('id_list_table')
|
||||||
rows = table.find_element_by_tag_name('tr')
|
rows = table.find_elements_by_tag_name('tr')
|
||||||
print(rows)
|
print(rows)
|
||||||
self.assertIn('1: Buy peacock feathers', [row.text for row in rows])
|
self.assertIn('1: Buy peacock feathers', [row.text for row in rows])
|
||||||
self.assertIn(
|
self.assertIn(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user