summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2021-02-07 18:32:58 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2021-02-07 18:32:58 +0800
commit7daf5c0080f0f082fea676ec5fa96621a68577dc (patch)
tree7e95565e72ea956eff2f5883676e87348f53ce92
parent01b66656b96e1513eed4325a5f1351a661a433f6 (diff)
app/test/test_add_word.py: scroll to the element.
-rw-r--r--app/test/test_add_word.py2
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: