Private Sub Window_SetSize()
Dim Driver As New ChromeDriver
Dim Size As Size
Driver.Get "https://google.co.jp"
Set Size = Driver.Window.Size
Driver.Wait 2000
Debug.Print Size.Width
Debug.Print Size.Height
Driver.Wait 2000
Driver.Quit
End Sub
Use_EleSize
Private Sub Use_EleSize()
Dim Driver As New ChromeDriver
Driver.Get "https://ja.wikipedia.org/wiki/メインページ"
Dim img As Selenium.Image
Dim elm As Selenium.WebElement
Dim Size As Size
Set elm = Driver.FindElementByXPath("//*[@id='sister-projects-list']")
Driver.Actions.MoveToElement(elm).Perform
Set Size = elm.Size
Debug.Print "Height:" & Size.Height
Debug.Print "Width:" & Size.Width
Driver.Quit
End Sub
SeleniumBasic WebElementClass Web要素の制御概要 Web要素制御用のクラス オブジェクト設定 ・変数宣言 Dim ele As WebElement 文法 Set ele = driver.[SerchContext]ele.[メソッド] メソッド・プロパティ メソッド...