Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
xm-uitest-sow
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiamai-test
xm-uitest-sow
Commits
75a6eb3d
Commit
75a6eb3d
authored
Jul 06, 2021
by
linguangwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
判断当前系统是否为Windows或者darwin(mac)(当前只有两钟系统)
parent
72a0ae42
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
src/framework/appDriver.py
+6
-1
No files found.
src/framework/appDriver.py
View file @
75a6eb3d
import
os
import
os
import
platform
from
time
import
sleep
,
time
from
time
import
sleep
,
time
from
src.framework.common
import
file_abspath
from
src.framework.common
import
file_abspath
...
@@ -9,7 +10,11 @@ from selenium.webdriver.chrome.webdriver import WebDriver
...
@@ -9,7 +10,11 @@ from selenium.webdriver.chrome.webdriver import WebDriver
# web_driver_path = os.path.join(
# web_driver_path = os.path.join(
# "./chromedriver")
# "./chromedriver")
service
=
webdriver
.
chrome
.
service
.
Service
(
file_abspath
()
+
"/tools/chromedriver.exe"
)
if
platform
.
system
()
.
lower
()
==
"windows"
:
service
=
webdriver
.
chrome
.
service
.
Service
(
file_abspath
()
+
"/tools/chromedriver.exe"
)
elif
platform
.
system
()
.
lower
()
==
"darwin"
:
service
=
webdriver
.
chrome
.
service
.
Service
(
file_abspath
()
+
"/tools/chromedriver"
)
service
.
start
()
service
.
start
()
...
...
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