Forked from kinuasa/SeleniumBasicで指定した要素の背景色を変更するVBAマクロ.vb
Created
October 21, 2025 13:34
-
-
Save datavudeja/ce37742139c3e91644299bd134ec170c to your computer and use it in GitHub Desktop.
SeleniumBasicで指定した要素の背景色を変更するVBAマクロ 関連Tweet:https://twitter.com/kinuasa/status/1440559227026563074
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Option Explicit | |
| Public Sub Sample() | |
| With CreateObject("Selenium.EdgeDriver") | |
| .Get "https://www.ka-net.org/blog/" | |
| Dim elm As Object 'Selenium.WebElement | |
| Set elm = .FindElementByXPath("/html/body/div[1]/div/a/span") | |
| .ExecuteScript "arguments[0].setAttribute('style', 'background-color:cyan')", elm | |
| Stop | |
| End With | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment