上传文件至 app/test

pull/110/head
谢尚海 2024-05-20 23:45:03 +08:00
parent eaf57fc54d
commit 2a60eec12c
1 changed files with 2 additions and 0 deletions

View File

@ -17,11 +17,13 @@ def test_highlight(driver, URL):
article = driver.find_element_by_id("article")
actions = ActionChains(driver)
actions.move_to_element(article).click_and_hold().move_by_offset(450,60).release().perform()
time.sleep(1)
# 判断所有高亮单词是否有间隔
marks = driver.find_elements_by_tag_name("mark")
for mark in marks:
assert mark.value_of_css_property("padding") == '0px'
time.sleep(5)
finally:
# 测试结束后关闭浏览器
driver.quit()