通过 google Chrome 访问 box.com excel 电子表格。弹出式插件拦截器

Accessing box.com excel spreadsheet through google Chrome. PopUp Plugin blocker

我正在尝试通过 excel 上的按钮自动打开来自 box.com 的电子表格。代码执行如下,但是当代码尝试按下 "box edit" 按钮(小铅笔图形)时 Google Chrome 阻止 "Box Edit" 打开电子表格。我已经尝试了摆脱弹出窗口阻止程序的正常过程,即 "Always allow popups from this site" "entering box.com under settings in chrome"。在我手动拉框时的代码之外,它显示 box.com 是允许的,但由于某种原因,当代码执行时,它就像是打开一个具有原始设置的新 chrome,因此阻止了插件。我提前为 sendkeys 道歉,我不熟悉 excel 的 selenium 插件。请帮忙,从字面上看,代码按预期执行,但弹出窗口阻止程序不允许下载电子表格。谢谢!

Sub openChrome()
Dim selenium As New SeleniumWrapper.WebDriver
Dim GC As Object
Dim intRowRowPosition As Integer
Dim keys As New SeleniumWrapper.keys

selenium.Start "chrome", "https://box.com/files/0/f/*********"
selenium.setTimeout ("120000")
selenium.setImplicitWait (5000)

selenium.Open ""
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "emailaddress", True
Application.SendKeys "{Tab}"
DoEvents
Application.Wait (Now + TimeValue("00:00:03"))
SendKeys "password", True
Application.SendKeys "{Return}"
DoEvents
Application.SendKeys ("{NUMLOCK}")
Application.Wait (Now + TimeValue("00:00:05"))

selenium.clickAndWait "id=preview_header_edit_btn"
End Sub

我想出了一个解决方法并添加到我的代码中。 (下)

selenium.Start "chrome", "Chrome://plugins"
selenium.setTimeout ("120000")
selenium.setImplicitWait (5000)
selenium.Open ""
selenium.clickAndWait "id=npBoxEdit.dll-always-allowed"
Application.SendKeys "^l", True
DoEvents
Application.SendKeys "https://box.com/files/0/f/"
Application.SendKeys "{Return}"