发送多个带有selenium的Tab键

发送多个带有selenium的Tab键,第1张

发送多个带有selenium的Tab键

使用动作链:

from selenium.webdriver.common.keys import Keysfrom selenium.webdriver.common.action_chains import ActionChainsN = 5  # number of times you want to press TABactions = ActionChains(browser) for _ in range(N):    actions = actions.send_keys(Keys.TAB)actions.perform()

或者,由于这是Python,因此您甚至可以执行以下 *** 作:

actions = ActionChains(browser) actions.send_keys(Keys.TAB * N)actions.perform()


欢迎分享,转载请注明来源:内存溢出

原文地址:https://54852.com/zaji/5169760.html

(0)
打赏 微信扫一扫微信扫一扫 支付宝扫一扫支付宝扫一扫
上一篇 2022-11-18
下一篇2022-11-18

发表评论

登录后才能评论

评论列表(0条)

    保存