From 4a42c5c22c97b9307267a4dcb3601ad680d15cf9 Mon Sep 17 00:00:00 2001 From: "1994836463@qq.com" Date: Mon, 27 May 2024 14:26:54 +0800 Subject: [PATCH] =?UTF-8?q?=E6=88=91=E5=8F=88=E5=B0=86tangxinyuan=E5=B0=8F?= =?UTF-8?q?=E7=BB=84=E7=9A=84=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81=E6=94=B9?= =?UTF-8?q?=E5=9B=9E=E5=8E=BB=E4=BA=86=EF=BC=8C=E6=88=91=E6=94=B9=E5=AE=8C?= =?UTF-8?q?=E6=88=91=E7=9A=84=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81=E4=B9=8B?= =?UTF-8?q?=E5=90=8E=EF=BC=8C=E5=8F=AA=E6=9C=89=E4=BD=BF=E7=94=A8=E6=9C=AA?= =?UTF-8?q?=E7=BB=8F=E6=88=91=E4=BF=AE=E6=94=B9=E7=9A=84tangxinyuan?= =?UTF-8?q?=E5=B0=8F=E7=BB=84=E7=9A=84=E6=B5=8B=E8=AF=95=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E6=89=8D=E8=83=BD=E9=80=9A=E8=BF=87=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/test/test_bug544_tangxinyuan.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/test/test_bug544_tangxinyuan.py b/app/test/test_bug544_tangxinyuan.py index 729c857..2cffdd4 100644 --- a/app/test/test_bug544_tangxinyuan.py +++ b/app/test/test_bug544_tangxinyuan.py @@ -2,7 +2,6 @@ import random import string import time -from selenium.webdriver import ActionChains from selenium.webdriver.common.by import By from selenium.webdriver.support.ui import WebDriverWait from selenium.webdriver.support import expected_conditions as EC @@ -39,8 +38,7 @@ def test_save_selected_word(driver, URL): stored_words = driver.execute_script('return localStorage.getItem("selectedWords");') assert word == stored_words, "Selected word not saved to localStorage correctly" # 退出并重新登录以检查存储的单词 - action_chains = ActionChains(driver) - action_chains.click(driver.find_element(By.LINK_TEXT, '退出')).perform() + driver.find_element(By.LINK_TEXT, '退出').click() driver.execute_script("window.open('');window.close();") # 等待一会儿,让浏览器有足够的时间关闭标签页