summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHui Lan <lanhui@zjnu.edu.cn>2021-02-11 20:48:34 +0800
committerHui Lan <lanhui@zjnu.edu.cn>2021-02-11 20:48:34 +0800
commitf8c58465e790343320b37e20dd20b3eef22f6f5f (patch)
tree3c9776661c9ce2ee311d95590344427e2c5cbe67
parenteab037ef5d77457adfe7be54512a3f209c08e70a (diff)
app/test/test_add_word.py and app/main.py: use name.
-rw-r--r--app/main.py2
-rw-r--r--app/test/test_add_word.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/app/main.py b/app/main.py
index 16591ba..51bac0d 100644
--- a/app/main.py
+++ b/app/main.py
@@ -299,7 +299,7 @@ def userpage(username):
for x in lst:
page += '<p><font color="grey">%d</font>: <a href="%s" title="%s">%s</a> (%d) <input type="checkbox" name="marked" value="%s"></p>\n' % (count, youdao_link(x[0]), appears_in_test(x[0], words_tests_dict), x[0], x[1], x[0])
count += 1
- page += ' <input id="add-to-new-word-book-btn" type="submit" value="加入我的生词簿"/>\n'
+ page += ' <input name="add-btn" type="submit" value="加入我的生词簿"/>\n'
page += '</form>\n'
return page
diff --git a/app/test/test_add_word.py b/app/test/test_add_word.py
index 3448799..a770880 100644
--- a/app/test/test_add_word.py
+++ b/app/test/test_add_word.py
@@ -57,7 +57,7 @@ def test_add_word():
if elem.get_attribute('name') == 'marked':
elem.click()
- elem = driver.find_element_by_id('add-to-new-word-book-btn') # 找到加入我的生词簿按钮
+ elem = driver.find_element_by_name('add-btn') # 找到加入我的生词簿按钮
elem.click()
driver.refresh()