update,
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
Attribute VB_Name = "Helloworld"
|
||||
Option Explicit
|
||||
|
||||
Dim driver As New ChromeDriver
|
||||
Dim rowc, cc, columnC As Integer
|
||||
|
||||
Sub helloworld()
|
||||
On Error GoTo eh
|
||||
|
||||
Config.init
|
||||
|
||||
driver.SetBinary ChromiumBinaryPath
|
||||
|
||||
driver.Start
|
||||
driver.AddArgument "--disable-blink-features=AutomationControlled"
|
||||
|
||||
|
||||
' driver.execute_script("Object.defineProperty(navigator, 'webdriver', {get: () => undefined})")
|
||||
' driver.ExecuteScript "alert('helloworld')"
|
||||
' driver.ExecuteScript "Object.defineProperty(navigator, 'webdriver', {get: () => undefined})"
|
||||
|
||||
|
||||
' driver.Get "http://localhost:8080/navigator_webdriver_test.html"
|
||||
' https://intoli.com/blog/not-possible-to-block-chrome-headless/chrome-headless-test.html
|
||||
' driver.Get "https://intoli.com/blog/not-possible-to-block-chrome-headless/chrome-headless-test.html"
|
||||
|
||||
driver.Get "http://www.aastocks.com"
|
||||
|
||||
|
||||
Application.Wait Now + TimeValue("00:00:5")
|
||||
|
||||
Done:
|
||||
debug.print "hello done"
|
||||
driver.quit
|
||||
|
||||
exit sub
|
||||
|
||||
eh:
|
||||
debug.print "hello error"
|
||||
|
||||
End Sub
|
Reference in New Issue
Block a user