forked from mrlan/EnglishPal
上传文件至 app/test
parent
708a6a2821
commit
1d7e61d751
|
@ -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)
|
Loading…
Reference in New Issue