VBA Selenium Sendkeys 修饰键

问题描述 投票:0回答:2

我正在尝试使用 Sendkeys 来 Ctrl+Shift+B 但是

.Sendkeys ("^+B")

不起作用。

vba selenium sendkeys
2个回答
3
投票

尝试创建一个 Keys 对象:

Dim keyObj As Selenium.Keys
Set keyObj = New Selenium.Keys
bot.SendKeys keyObj.Control & keyObj.Shift & "B"

0
投票

@丹尼尔- 尝试使用以下行选择整个 Chrome 网页:

driver.SendKeys keyObj.Control & "A"  >> Working, selecting all texts on Chrome.
driver.SendKeys keyObj.Control & "C" >> Not Working, trying to copy text.

您可以帮忙 keyObj.Control 和“C”吗?

谢谢。

© www.soinside.com 2019 - 2024. All rights reserved.