update,
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
Attribute VB_Name = "Config"
|
||||
Option Explicit
|
||||
|
||||
Global ChromiumBinaryPath as string
|
||||
|
||||
Sub init
|
||||
ChromiumBinaryPath = "C:\Users\logic\AppData\Local\Chromium\Application\chrome.exe"
|
||||
|
||||
end sub
|
@@ -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
|
@@ -0,0 +1,5 @@
|
||||
@REM start excel by yourself
|
||||
|
||||
@REM ./test.xlsm
|
||||
|
||||
xlwings vba edit
|
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"name": "hello-error",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"gitUpdate":"git add . && git commit -m\"update,\""
|
||||
},
|
||||
"keywords": [],
|
||||
"author": "",
|
||||
"license": "ISC"
|
||||
}
|
Binary file not shown.
Reference in New Issue
Block a user