Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
Songselenium
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
宋鹏博
Songselenium
Commits
49630a73
Commit
49630a73
authored
Nov 26, 2025
by
杨基红
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update login page
parent
030afcf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
untils.py
common/untils.py
+10
-1
LoginPage.py
paga/LoginPage.py
+1
-1
No files found.
common/untils.py
View file @
49630a73
import
time
import
warnings
from
selenium
import
webdriver
from
appium
import
webdriver
as
appwebdriver
from
selenium.webdriver.chrome.options
import
Options
# 尝试导入 appium,如果失败则设置为 None
appwebdriver
=
None
try
:
from
appium
import
webdriver
as
appwebdriver
except
ImportError
:
warnings
.
warn
(
"Appium 模块未安装,移动端测试功能将不可用"
)
from
config
import
appium_server_url
,
caps
...
...
@@ -36,6 +43,8 @@ class DriverTools:
# 打开app驱动
@classmethod
def
get_app_driver
(
cls
):
if
appwebdriver
is
None
:
raise
ImportError
(
"Appium 模块未安装,无法初始化移动设备驱动"
)
if
cls
.
__app_driver
is
None
:
cls
.
__app_driver
=
appwebdriver
.
Remote
(
appium_server_url
,
caps
)
cls
.
__app_driver
.
implicitly_wait
(
10
)
...
...
paga/LoginPage.py
View file @
49630a73
...
...
@@ -28,7 +28,7 @@ class Login(BasePage):
time
.
sleep
(
1
)
self
.
find_ele
(
self
.
follow_password
)
.
send_keys
(
password
)
time
.
sleep
(
1
)
self
.
find_ele
(
self
.
agree_box
)
.
click
()
#
self.find_ele(self.agree_box).click()
self
.
find_ele
(
self
.
person_login
)
.
click
()
time
.
sleep
(
1
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment