python-2.7 - 如何使用 Robotframework 解决 selenium:chromedriver 的 SessionNotCreatedException?
问题描述
我最近为我的 Robotframework 项目升级了 selenium 版本,自从我看到 chrome 驱动程序尝试打开 chrome 浏览器但未能以错误开头
SessionNotCreatedException: Message: session not created
from timeout: Timed out receiving message from renderer: 600.000
(Session info: chrome=76.0.3809.132)
系统详情:Chrome浏览器版本:76.0.3809.132 Windows 10机器chromedriver位置:C:\Python27
发生:问题总是发生在套件中的 4 个测试用例中的 1 个。chrome 浏览器打开 600 秒后关闭。看起来屏幕正在尝试初始化浏览器。
Troubleshoot :
1. Tried downloading the latest chrome driver 76.0.3809.132
2. Tried cleaning the project and rerun
3. Restarted the system
4. Tried creating a fresh project.
5. Tried running using from eclipse, pybot, robot
6. Updated all the libraries found in pip freeze. Python 2.7.9 version used
7. Was it working with previous version of Selenium and chrome driver 76.0.3809.132 with chrome browser 76.0.3809.132? BIG YES, but now I don't know what version I was using.
8. Tried using selenium grid docker container and the script ran successfully.
使用的代码:
*** Settings ***
Library SeleniumLibrary
*** Keywords ***
Open Browser local
[Arguments] ${URL}
Open Browser ${URL} ${BROWSER}
*** Test Cases ***
TC1
[Setup] Open Browser local ${URL}
#Maximize Browser Window
Set Browser Implicit Wait 10s
Input Text id=loginid xxx
Click Button id=continue-button
Input Text id=login-password xxx
Click Button id=login-button
Sleep 10s
[Teardown] Close Browser
问题:请告诉我如何解决这个问题?
解决方案
推荐阅读
- java - @DataJpaTest 使用存储库保存实体,无法使用 JdbcTemplate 检索数据
- javascript - 如何正确设置元素的高度属性?
- python - 将数据集拆分为训练和测试以在 python 中进行时间序列分析
- javascript - 为什么我的 useEffect 中仍然有陈旧的数据?
- javascript - Angular - 惊人的时间选择器(ATP)TimePicker在选择小时后不会切换到分钟
- youtube-data-api - YouTube V3 LiveBroadcasts:列出服务帐户凭据问题
- arrays - 如何从具有多个对象的嵌套数组中提取信息?(AdminReport.Activity.list)
- amazon-web-services - AWS API 网关配置来自不同区域的 vpc 端点 ID
- javascript - Javascript 正则表达式 - 金额中的第一个数字接受非零
- c++ - 使用一个 cout 命令打印多个字符串,每个字符串放在不同的(文本编辑器)行