windows - 使用 selenium 和机器人框架时 chrome 中的登录问题
问题描述
我正在使用 selenium2library 和 robotsframework 使用 chrome 作为浏览器登录是手动工作的,但不是使用具有相同用户名和密码的脚本。我正在使用最新的 chrome 和 chrome 驱动程序(83 版本)。使用 selenium2Library 此外,通过脚本输入用户名和密码后,我使用 get value 从 UI 获取值并与输入值进行比较。两个值相同。然后也是在单击登录按钮后,我收到了错误的凭据错误
在通过脚本打开的浏览器中(当我暂停执行时),我可以手动输入用户名和密码,这工作正常。但是通过脚本输入值不起作用
可能是什么问题?PFB:
Open Browser <URL> browser=chrome executable_path=D:\\chromedriver.exe
Sleep 30s
Wait Until Page Contains Element //input[@id="username"]
Input Text //input[@id="username"] <USERNAME?
Input Text //input[@id="password"] <PASSWORD>
Press Keys //input[@id="password"] Enter
comment Click Element //*[@id="sign_in"]
Sleep 20s
Wait Until Page Contains Element <XPATH> timeout=30s
Confirguration in windows:
robotframework-3.1.2
robotframework-autoitlibrary-1.2.5
robotframework-imagelibrary-0.1.1
robotframework-ride 1.7.4.1
robotframework-selenium2library 3.0.0
robotframework-seleniumlibrary 4.4.0
Chrome- 83.04
ChromeDriver 83.0.4103.39
解决方案
推荐阅读
- python - Pyspark:将列分解为新的数据框
- sql - ORA-00937 使用 CASE 条件时不是单组组函数
- react-native - 将侦听器添加到 Diff Clamp,React Native
- chainer - Chainer:基于时间限制提前停止的自定义扩展
- c# - 如何接口 IGrouping
产生多个值? - python - 使用 ctypes 在 python 中调用 C++ 函数
- r - 如何根据 R 中的 group_by 函数对列中的所有唯一因子求和并输出为新列?
- python - 数据框列:如果单元格包含字符串,则返回从找到字符串的索引开始的数字范围
- bootstrap-4 - 修复了被页面内容覆盖的引导导航栏
- python-3.x - 如何使用序列一个一个地遍历具有相同值的 dic 中的所有键