diff options
-rw-r--r-- | app/test/test_add_word.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/app/test/test_add_word.py b/app/test/test_add_word.py index 48b12e0..2633be8 100644 --- a/app/test/test_add_word.py +++ b/app/test/test_add_word.py @@ -47,10 +47,11 @@ def test_add_word(): word = random.choice(essay_content.split()) 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) - driver.save_screenshot('./app/test/test_add_word_pic1.png') - elem = driver.find_element_by_xpath('//form[2]//input[1]') # 找到get所有词频按钮 - elem.click() + + 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.click() elems = driver.find_elements_by_xpath("//input[@type='checkbox']") for elem in elems: |