From 1d7e61d7519342396bec9c64cdd8090c1515cec7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E6=99=9F=E6=99=94?= <759539128@qq.com> Date: Mon, 6 May 2024 11:36:36 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E8=87=B3=20app/test?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/test/test_bug551_DingZeYu.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 app/test/test_bug551_DingZeYu.py diff --git a/app/test/test_bug551_DingZeYu.py b/app/test/test_bug551_DingZeYu.py new file mode 100644 index 0000000..799a562 --- /dev/null +++ b/app/test/test_bug551_DingZeYu.py @@ -0,0 +1,26 @@ +import time +import pytest +from selenium import webdriver +from selenium.webdriver import ActionChains +from selenium.webdriver.common.by import By + + +def test_bug551(): + driver = webdriver.Edge() + driver.maximize_window() + driver.get("http://127.0.0.1:5000/") + + driver.find_element(By.CSS_SELECTOR, 'a[href="/login"]').click() + driver.find_element(By.CLASS_NAME, 'username').send_keys('dzy') + driver.find_element(By.CLASS_NAME, 'password').send_keys('123456') + driver.find_element(By.CLASS_NAME, 'btn').click() + + article = driver.find_element(By.ID, 'article') + actions = ActionChains(driver) + + actions.move_to_element(article) + actions.click_and_hold() + actions.move_by_offset(450, 200) + actions.release() + actions.perform() + time.sleep(5) From ff6286cf01bccdda793ec626c66594e43d81cb16 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=81=E6=99=9F=E6=99=94?= <759539128@qq.com> Date: Mon, 6 May 2024 11:42:32 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=88=A0=E9=99=A4=20app/test/test=5Fbug551?= =?UTF-8?q?=5FDingZeYu.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/test/test_bug551_DingZeYu.py | 26 -------------------------- 1 file changed, 26 deletions(-) delete mode 100644 app/test/test_bug551_DingZeYu.py diff --git a/app/test/test_bug551_DingZeYu.py b/app/test/test_bug551_DingZeYu.py deleted file mode 100644 index 799a562..0000000 --- a/app/test/test_bug551_DingZeYu.py +++ /dev/null @@ -1,26 +0,0 @@ -import time -import pytest -from selenium import webdriver -from selenium.webdriver import ActionChains -from selenium.webdriver.common.by import By - - -def test_bug551(): - driver = webdriver.Edge() - driver.maximize_window() - driver.get("http://127.0.0.1:5000/") - - driver.find_element(By.CSS_SELECTOR, 'a[href="/login"]').click() - driver.find_element(By.CLASS_NAME, 'username').send_keys('dzy') - driver.find_element(By.CLASS_NAME, 'password').send_keys('123456') - driver.find_element(By.CLASS_NAME, 'btn').click() - - article = driver.find_element(By.ID, 'article') - actions = ActionChains(driver) - - actions.move_to_element(article) - actions.click_and_hold() - actions.move_by_offset(450, 200) - actions.release() - actions.perform() - time.sleep(5)