From f8c58465e790343320b37e20dd20b3eef22f6f5f Mon Sep 17 00:00:00 2001 From: Hui Lan Date: Thu, 11 Feb 2021 20:48:34 +0800 Subject: app/test/test_add_word.py and app/main.py: use name. --- app/main.py | 2 +- 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 16591ba..51bac0d 100644 --- a/app/main.py +++ b/app/main.py @@ -299,7 +299,7 @@ def userpage(username): for x in lst: page += '

%d: %s (%d)

\n' % (count, youdao_link(x[0]), appears_in_test(x[0], words_tests_dict), x[0], x[1], x[0]) count += 1 - page += ' \n' + page += ' \n' page += '\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() -- cgit v1.2.1