update,
This commit is contained in:
24
task1/task1-ticket1/_ref/Excel/Examples/usage_frame.bas
Normal file
24
task1/task1-ticket1/_ref/Excel/Examples/usage_frame.bas
Normal file
@@ -0,0 +1,24 @@
|
||||
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
|
Reference in New Issue
Block a user