diff options
author | Hui Lan <lanhui@zjnu.edu.cn> | 2021-02-07 18:18:04 +0800 |
---|---|---|
committer | Hui Lan <lanhui@zjnu.edu.cn> | 2021-02-07 18:18:04 +0800 |
commit | 01b66656b96e1513eed4325a5f1351a661a433f6 (patch) | |
tree | a62250854ffe60e1bbae74a19e8c27db35f293cc | |
parent | aa5350a2c4465554a407f37e2e4cdaeb9b827f0a (diff) |
app/test/test_add_word.py: capture one more screenshot.
-rw-r--r-- | app/test/test_add_word.py | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/test/test_add_word.py b/app/test/test_add_word.py index f4fdb68..db862fc 100644 --- a/app/test/test_add_word.py +++ b/app/test/test_add_word.py @@ -57,5 +57,15 @@ def test_add_word(): elem.click() driver.save_screenshot('./app/test/test_add_word_pic3.png') + + elems = driver.find_elements_by_xpath("//p[@id='new-word']") + driver.save_screenshot('./app/test/test_add_word_pic4.png') + found = 0 + for elem in elems: + if word in elem.text: + found = 1 + break + + assert found == 1 driver.quit() |