我使用Visual Studio 2010构建项目。它叫做OpenQA.Selenium.Chrome。对于我来说,这个问题没有出现在我的电脑上。但是当该程序在其他PC上运行时,会显示类似错误
我不知道这种情况。下面是我编写的代码
Imports OpenQA.Selenium
Imports OpenQA.Selenium.Keys
Imports OpenQA.Selenium.Chrome
Imports System.Threading.Thread
Imports System.Text.RegularExpressions
Try
start = 1
Button1.BackColor = Color.Maroon
Button1.ForeColor = Color.BurlyWood
Button1.Text = "STOP"
service = ChromeDriverService.CreateDefaultService()
service.HideCommandPromptWindow = True
options = New ChromeOptions
options.AddArguments("user-data-dir=" & Application.StartupPath & "/profile") '/path/to/your/custom/profile") ' SET PROFILE PATH
driver = New ChromeDriver(service, options)
driver.Navigate().GoToUrl("http://web.whatsapp.com")
Catch ex As Exception
MsgBox(ex.ToString)
End Try