diff options
-rw-r--r-- | app/main.py | 2 | ||||
-rw-r--r-- | app/test/test_add_word.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/app/main.py b/app/main.py index 9ffe91f..16591ba 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 type="submit" value="加入我的生词簿"/>\n'
+ page += ' <input id="add-to-new-word-book-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 da1a2e3..090ee17 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_xpath('//form[1]/input[1]') # 找到加入我的生词簿按钮 + elem = driver.find_element_by_id('add-to-new-word-book-btn') # 找到加入我的生词簿按钮 elem.click() elems = driver.find_elements_by_xpath("//p[@class='new-word']") |