Skip to content

Commit 2df6482

Browse files
committed
Chore: Update DemoFrames
1 parent 8386b48 commit 2df6482

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

wd_demo.au3

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,21 @@ EndFunc
247247
Func DemoFrames()
248248
Local $sElement
249249

250-
_WD_Navigate($sSession, "https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_frame_cols")
250+
_WD_Navigate($sSession, "https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe")
251251
ConsoleWrite("Frames=" & _WD_GetFrameCount($sSession) & @CRLF)
252252
ConsoleWrite("TopWindow=" & _WD_IsWindowTop($sSession) & @CRLF)
253253
$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//iframe[@id='iframeResult']")
254254
_WD_FrameEnter($sSession, $sElement)
255255
ConsoleWrite("TopWindow=" & _WD_IsWindowTop($sSession) & @CRLF)
256+
$sElement = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//iframe")
257+
_WD_FrameEnter($sSession, $sElement)
258+
$sButton = _WD_FindElement($sSession, $_WD_LOCATOR_ByXPath, "//button[@id='w3loginbtn']")
259+
_WD_ElementAction($sSession, $sButton, 'click')
260+
_WD_LoadWait($sSession, 2000)
261+
_WD_FrameLeave($sSession)
262+
ConsoleWrite("TopWindow=" & _WD_IsWindowTop($sSession) & @CRLF)
256263
_WD_FrameLeave($sSession)
257264
ConsoleWrite("TopWindow=" & _WD_IsWindowTop($sSession) & @CRLF)
258-
259265
EndFunc
260266

261267
Func DemoActions()

0 commit comments

Comments
 (0)