This commit is contained in:
2025-11-06 11:59:35 +08:00
parent 553f0f6231
commit 8ceb63b4b8
2 changed files with 11 additions and 9 deletions

18
main.py
View File

@@ -32,20 +32,20 @@ def main(http: str, browser_id: str):
print(f'使用 http 接管浏览器: {http}')
tab = Chromium(http).new_tab()
# 跳转到登录页面
tab.get('https://gitee.com/login')
tab.get('https://baidu.com')
# 定位到账号文本框,获取文本框元素
ele = tab.ele('#user_login')
# 输入账号
ele.input('您的账号')
# 定位到密码文本框并输入密码
tab.ele('#user_password').input('您的密码')
# 点击登录按钮
tab.ele('@value=登 录').click()
# ele = tab.ele('#user_login')
# # 输入账号
# ele.input('您的账号')
# # 定位到密码文本框并输入密码
# tab.ele('#user_password').input('您的密码')
# # 点击登录按钮
# tab.ele('@value=登 录').click()
# while True:
# print(1)
# time.sleep(5)
print(f'打开成功')
time.sleep(random.randint(5, 10))
task_push(project_name, browser_id)