Comments (8)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome failed to start: exited normally.
浏览器版本是多少,猜测可能是浏览器版本跟webdriver_manager版本不匹配
from hw_seckill.
def __browser_setting(self): print("{0} 开始设置浏览器参数".format(datetime.now())) options = webdriver.ChromeOptions() options.add_argument(r"--user-data-dir={}".format(self.__config_get("chrome", "userDataDir"))) options.add_argument(r"--profile-directory={}".format("Profile 5")) options.add_argument('--ignore-certificate-errors') options.add_argument('--ignore-certificate-errors-spki-list') options.add_argument('--ignore-ssl-errors') options.add_argument('--ignore-ssl-error') options.add_argument('--log-level=3') options.add_experimental_option('excludeSwitches', ['enable-logging']) browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) print("{0} 设置浏览器参数完成".format(datetime.now())) browser.maximize_window() self.browser = browser
我给这里加了一行:options.add_argument('--headless')
就不报错了,运行下去了。这样的话就是无界面运行了。
from hw_seckill.
selenium.common.exceptions.SessionNotCreatedException:消息:会话未创建:Chrome 无法启动:正常退出。
浏览器版本是多少,猜测可能是浏览器版本与webdriver_manager版本不匹配
版本 117.0.5938.150(正式版本) (64 位)最新的版本
from hw_seckill.
def __browser_setting(self): print("{0} 开始设置浏览器参数".format(datetime.now())) options = webdriver.ChromeOptions() options.add_argument(r"--user-data-dir={}".format(self.__config_get("chrome", "userDataDir"))) options.add_argument(r"--profile-directory={}".format("Profile 5")) options.add_argument('--ignore-certificate-errors') options.add_argument('--ignore-certificate-errors-spki-list') options.add_argument('--ignore-ssl-errors') options.add_argument('--ignore-ssl-error') options.add_argument('--log-level=3') options.add_experimental_option('excludeSwitches', ['enable-logging']) browser = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options) print("{0} 设置浏览器参数完成".format(datetime.now())) browser.maximize_window() self.browser = browser
我给这里加了一行:options.add_argument('--headless') 就不报错了,运行下去了。这样的话就是无界面运行了。
我加了一行,然后就跟你最近的报错一样,卡在登录按钮那里了
from hw_seckill.
尝试了多种定位都不行,用selenium的录制功能CSS定位也定位不到,奇怪了。
from hw_seckill.
Author
加了--headless后,登陆按钮会定位不到
from hw_seckill.
我用了最新一版现在能跑起来了,等明天到点试试
from hw_seckill.
已经解决了,这个issue我关闭了
from hw_seckill.
Related Issues (20)
- Message: no such element: Unable to locate element: {"method":"css selector","selector":"#pro-operation > a"} HOT 3
- 登录跳转失败,未找到登录跳转链接 HOT 5
- 出现了排队中,要不要点击取消排队,还是一直等
- 抢购时间与网站不一致 HOT 1
- 测试购买x3出错 HOT 3
- 没有地址
- 没有地址 HOT 2
- 抢购时间 HOT 2
- 长时间打开软件,账号会自动退出登录,建议加一个抢购前几分钟验证登录信息是否已登录,如果未登录,进行登录操作。 HOT 1
- 有没有人抢到了呀,发出来,让我有信心继续抢下去 HOT 12
- 安装太麻烦了吧,建议打包好docker镜像直接使用
- 建议直接做成软件,或手机APP,选填一下参数,点开抢按钮即可以开始
- 出现异常错误,edge已经打开了主页,第一次是成功的,后面就不行了,重启电脑也不行 HOT 1
- 延迟高
- mac + safari 输入验证码的时候弹框 HOT 1
- 程序报错 HOT 1
- firefox无法登录 HOT 3
- 最新版的chrome直接报错了 HOT 1
- 请问京东抢购规划好了吗?
- 求更新pura70的🥹 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hw_seckill.