diff options
author | Hui Lan <lanhui@zjnu.edu.cn> | 2021-02-07 18:32:58 +0800 |
---|---|---|
committer | Hui Lan <lanhui@zjnu.edu.cn> | 2021-02-07 18:32:58 +0800 |
commit | 7daf5c0080f0f082fea676ec5fa96621a68577dc (patch) | |
tree | 7e95565e72ea956eff2f5883676e87348f53ce92 | |
parent | 01b66656b96e1513eed4325a5f1351a661a433f6 (diff) |
app/test/test_add_word.py: scroll to the element.
-rw-r--r-- | app/test/test_add_word.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/test/test_add_word.py b/app/test/test_add_word.py index db862fc..d194ec7 100644 --- a/app/test/test_add_word.py +++ b/app/test/test_add_word.py @@ -59,7 +59,9 @@ def test_add_word(): driver.save_screenshot('./app/test/test_add_word_pic3.png') elems = driver.find_elements_by_xpath("//p[@id='new-word']") + elems[0].location_once_scrolled_into_view driver.save_screenshot('./app/test/test_add_word_pic4.png') + found = 0 for elem in elems: if word in elem.text: |