Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
selenium
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
谢非
selenium
Commits
63eb86fe
Commit
63eb86fe
authored
Mar 15, 2024
by
1161899172@qq.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改名称相关问题
parent
890865f1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
8 deletions
+13
-8
test11.py
test11.py
+13
-8
No files found.
test11.py
View file @
63eb86fe
import
time
from
selenium
import
webdriver
from
selenium.webdriver.chrome.options
import
Options
option
=
webdriver
.
ChromeOptions
()
option
.
add_argument
(
'no-sandbox'
)
# 加上此项,不报错
option
.
add_argument
(
'--headless'
)
browser
=
webdriver
.
Chrome
(
options
=
option
)
browser
.
get
(
"https://ra.raysgo.com/agent/thesaurus/config"
)
browser
.
quit
()
\ No newline at end of file
# 添加浏览器参数
chrom_options
=
Options
()
chrom_options
.
add_argument
(
'--headless'
)
ch_options
=
Options
()
ch_options
.
add_argument
(
'--headless'
)
driver
=
webdriver
.
Chrome
(
chrome_options
=
ch_options
)
# 打开百度试一下
driver
.
get
(
"https://www.baidu.com"
)
time
.
sleep
(
3
)
print
(
driver
.
title
)
driver
.
quit
()
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