From be7ae9e296342b7e39dc5fdde8afbde1b6ffbf48 Mon Sep 17 00:00:00 2001 From: liangziyue <3039459470@qq.com> Date: Thu, 27 Jun 2024 17:06:54 +0800 Subject: [PATCH 1/2] fix bug561 --- app/test/test_bug561_LiangZiyue.py | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 app/test/test_bug561_LiangZiyue.py diff --git a/app/test/test_bug561_LiangZiyue.py b/app/test/test_bug561_LiangZiyue.py new file mode 100644 index 0000000..368bc0b --- /dev/null +++ b/app/test/test_bug561_LiangZiyue.py @@ -0,0 +1,27 @@ +import random +import string +from selenium.webdriver.common.by import By +from selenium.webdriver.support.ui import WebDriverWait +from selenium.webdriver.support import expected_conditions as EC + + +def test_bug561_LiangZiyue(driver, URL): + try: + driver.get(home) + WebDriverWait(driver, 10).until(EC.element_to_be_clickable((By.LINK_TEXT, '登录'))).click() + driver.find_element(By.ID, 'username').send_keys("wrr") + driver.find_element(By.ID, 'password').send_keys("1234") + driver.find_element(By.XPATH, '//button[text()="登录"]').click() + ele = driver.find_element(By.XPATH,'//font[@id="article"]') + driver.execute_script('arguments[0].scrollIntoView();',ele) + action = ActionChains(driver) + action.click_and_hold(ele) + action.move_by_offset(0,500) + action.perform() + next_ele = driver.find_element(By.ID,'//button[@id="load_next_article"]') + driver.execute_script('arguments[0].scrollIntoView();',next_ele) + next_ele.click() + driver.execute_script('arguments[0].scrollIntoView();',ele) + ele.click() + finally: + driver.quit() \ No newline at end of file From 3db629b57d037a06092eddfc6be1211b0724d291 Mon Sep 17 00:00:00 2001 From: Lan Hui <1348141770@qq.com> Date: Wed, 3 Jul 2024 07:39:33 +0800 Subject: [PATCH 2/2] Update version flag on the front page --- app/templates/mainpage_get.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/mainpage_get.html b/app/templates/mainpage_get.html index 3ba0ece..2a9b8e3 100644 --- a/app/templates/mainpage_get.html +++ b/app/templates/mainpage_get.html @@ -44,7 +44,7 @@ <a href="http://youdao.com/w/eng/{{x[0]}}/#keyfrom=dict2.index">{{x[0]}}</a> {{x[1]}} {% endfor %} {% endif %} - <p class="text-muted">Version: 20230810</p> + <p class="text-muted">Version: 20240618</p> <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.2/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script> </div> {{ yml['footer'] | safe }}