2024-05-12 13:39:14 +08:00
|
|
|
import time
|
|
|
|
import pytest
|
|
|
|
from selenium import webdriver
|
|
|
|
from selenium.webdriver import ActionChains
|
|
|
|
from selenium.webdriver.common.by import By
|
|
|
|
from selenium.webdriver.common.alert import Alert
|
|
|
|
from selenium.webdriver.support import expected_conditions as EC
|
|
|
|
from selenium.webdriver.support.wait import WebDriverWait
|
2024-05-18 09:23:36 +08:00
|
|
|
from helper import signup
|
2024-05-12 13:39:14 +08:00
|
|
|
|
|
|
|
def test_bug551():
|
|
|
|
driver = webdriver.Edge()
|
|
|
|
driver.maximize_window()
|
|
|
|
driver.get("http://127.0.0.1:5000/")
|
|
|
|
|
2024-05-18 09:23:36 +08:00
|
|
|
username, password = signup("http://127.0.0.1:5000/", driver)
|
2024-05-12 13:39:14 +08:00
|
|
|
|
|
|
|
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()
|
2024-05-18 09:18:22 +08:00
|
|
|
time.sleep(5)
|