Files
armandarmand/task1/task1-ticket1/_ref/Excel/Examples/usage_frame.bas
louiscklaw 8719fe58b8 update,
2025-02-01 01:59:56 +08:00

25 lines
674 B
QBasic

Attribute VB_Name = "usage_frame"
Private Assert As New Selenium.Assert
Private Keys As New Selenium.Keys
Private Sub Handle_Frames()
Dim driver As New ChromeDriver
driver.Get "http://the-internet.herokuapp.com/nested_frames"
'switch to a child frame
driver.SwitchToFrame "frame-top"
Assert.Equals 3, driver.FindElementsByTag("frame").count
'switch to child frame of "frame-top"
driver.SwitchToFrame "frame-middle"
Assert.Equals "MIDDLE", driver.FindElementById("content").Text
'switch to the default content
driver.SwitchToDefaultContent
Assert.Equals 2, driver.FindElementsByTag("frame").count
'Stop the browser
driver.Quit
End Sub