python-2.7 - 使用硒发送右箭头键 - Chrome(MacOS)
问题描述
我在 Python 中使用 RobotFramework 来自动化 macOS Chrome 浏览器上的应用程序。我需要发送多个按键来向右滚动我的网格,但没有运气。
我尝试使用.sendKeys()
:
from selenium.webdriver.common.keys import Keys
from selenium.webdriver.common.action_chains import ActionChains
ActionChains(self._current_browser()).send_keys(Keys.ARROW_RIGHT).perform()
我读过这sendKeys()
不适用于 macOS。有什么替代方案?
解决方案
推荐阅读
- r - 使用 mutate 和 recode 函数的语法有什么问题?
- python - 递归符号计算 - 提高性能
- cordova - 我可以将当前版本的 Ionic CLI 和 Cordova 用于 ionic-1 项目吗?
- heroku - 删除 h 用户名后,带有 Django 频道的 Heroku Redis 不再工作
- javascript - 键入接收对象并更新属性的方法的正确方法是什么?
- sql-server - 如何在 SQL Server Management Studio 中更新表中的列而不引入重复项
- java - 更改 OS JAVA 系统属性
- javascript - 当方法的值更新时触发事件
- python - AttributeError:'str'对象没有属性'write json
- angular - TSLint 期望箭头参数具有 typedef