首页 > 解决方案 > 使用硒发送右箭头键 - 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。有什么替代方案?

标签: python-2.7seleniumrobotframeworkui-automation

解决方案


推荐阅读