diff --git a/app/test/test_bug545_HuangHuiLing.py b/app/test/test_bug545_HuangHuiLing.py index 04897af..97860d0 100644 --- a/app/test/test_bug545_HuangHuiLing.py +++ b/app/test/test_bug545_HuangHuiLing.py @@ -9,10 +9,6 @@ from selenium.webdriver.common.action_chains import ActionChains from helper import signup -def has_punctuation(s): - return any(c in string.punctuation for c in s) - - def select(driver): text_element = driver.find_element(By.ID, 'article') @@ -26,7 +22,7 @@ def select(driver): # 假设我们想要选择从第10个字符开始的5个字符 actions.click() actions.perform() - time.sleep(5) + time.sleep(1) # 找到包含要选择文字的元素 text_element = driver.find_element(By.ID, 'article_title') @@ -62,7 +58,7 @@ def test_selected_second_word(driver, URL): assert selected_words != "","选中单词被放置框中" #再次选取 select(driver) - time.sleep(6) + time.sleep(1) selected_second_words = driver.find_element(By.ID, 'selected-words').get_attribute('value') assert selected_second_words.strip() == "", "选中的单词被删除" finally: