parent
e7f85daba3
commit
cb886c3d39
3 changed files with 22 additions and 36 deletions
@ -0,0 +1,10 @@ |
|||||||
|
# 测试地址 |
||||||
|
BASE_URL= 'http://ankangfulu.yhz.com' |
||||||
|
|
||||||
|
# 医馆 |
||||||
|
CLINIC_NAME = '厚生堂(测试)诊所' |
||||||
|
|
||||||
|
# 管理员账号 |
||||||
|
ADMIN_ACCOUNT = '18611659484' |
||||||
|
ADMIN_PWD = 'admin123' |
||||||
|
|
@ -1,29 +0,0 @@ |
|||||||
from playwright.sync_api import sync_playwright |
|
||||||
|
|
||||||
driver = sync_playwright().start() |
|
||||||
|
|
||||||
browser = driver.chromium.launch(headless=False) |
|
||||||
|
|
||||||
page = browser.new_page() |
|
||||||
|
|
||||||
page.goto('http://ankangfulu.yhz.com') |
|
||||||
|
|
||||||
login_input = page.locator('.ivu-input') |
|
||||||
|
|
||||||
login_input.nth(0).fill('18611659484') |
|
||||||
|
|
||||||
login_input.nth(1).click() |
|
||||||
page.wait_for_timeout(1000) |
|
||||||
|
|
||||||
page.locator('.ivu-select-input').click() |
|
||||||
all_clince = page.locator('.ivu-select-dropdown-list').locator('.ivu-select-item').all() |
|
||||||
for clince in all_clince: |
|
||||||
if clince.inner_text() == '厚生堂(测试)诊所': |
|
||||||
clince.click() |
|
||||||
|
|
||||||
login_input.nth(1).click() |
|
||||||
login_input.nth(1).fill('admin123') |
|
||||||
|
|
||||||
page.locator('.login-form-btn').click() |
|
||||||
|
|
||||||
page.wait_for_timeout(10000) |
|
Loading…
Reference in new issue