summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2021-02-11 15:39:13 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2021-02-11 15:39:13 +0800
commita092115806844e50cb413089328dcf2b0f9ad770 (patch)
treeea4fc97387ad1c3c30ee59aa3e9bc1f0654049c4
parente695b4b3c33c6d7c42f0ff35963bbdfc286b0f02 (diff)
app/test/test_add_word.py and app/test/test_add_word_and_essay_does_not_change.py: change index of form, as I have removed the link form.
-rw-r--r--app/test/test_add_word.py2
-rw-r--r--app/test/test_add_word_and_essay_does_not_change.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/test/test_add_word.py b/app/test/test_add_word.py
index 01d867f..9c87e1c 100644
--- a/app/test/test_add_word.py
+++ b/app/test/test_add_word.py
@@ -49,7 +49,7 @@ def test_add_word():
elem.send_keys(word)
driver.save_screenshot('./app/test/test_add_word_pic1.png')
- elem = driver.find_element_by_xpath('//form[2]//input[1]') # 找到get所有词频按钮
+ elem = driver.find_element_by_xpath('//form[1]//input[1]') # 找到get所有词频按钮
elem.click()
elems = driver.find_elements_by_xpath("//input[@type='checkbox']")
diff --git a/app/test/test_add_word_and_essay_does_not_change.py b/app/test/test_add_word_and_essay_does_not_change.py
index 3328c11..576e432 100644
--- a/app/test/test_add_word_and_essay_does_not_change.py
+++ b/app/test/test_add_word_and_essay_does_not_change.py
@@ -48,7 +48,7 @@ def test_add_word_and_essay_does_not_change():
while 'font>' in word or 'br>' in word or 'p>' in word or len(word) < 5 or has_punctuation(word):
word = random.choice(essay_content.split())
elem.send_keys(word)
- elem = driver.find_element_by_xpath('//form[2]//input[1]') # 找到get所有词频按钮
+ elem = driver.find_element_by_xpath('//form[1]//input[1]') # 找到get所有词频按钮
elem.click()
elems = driver.find_elements_by_xpath("//input[@type='checkbox']")