Skip to content

Commit 1d8ad45

Browse files
authored
Update 018-BasicFramesDemo.au3
1 parent 4cbe66c commit 1d8ad45

1 file changed

Lines changed: 19 additions & 6 deletions

File tree

examples/018-BasicFramesDemo.au3

Lines changed: 19 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,40 @@ Func Main()
5454
;~ _Demo_NavigateCheckBanner($sSession, "https://www.w3schools.com/tags/tryit.asp?filename=tryhtml_iframe", '//*[@id="snigel-cmp-framework" and @class="snigel-cmp-framework"]')
5555
If @error Then Return SetError(@error, @extended)
5656

57-
#Region ; testing NetWebView2Lib new methodes
57+
#Region ; Example part 1 - testing NetWebView2Lib new methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame)
5858
Local $iFrameCount = $oWebV2M.GetFrameCount()
5959
ConsoleWrite(@CRLF)
6060
ConsoleWrite("! " & @ScriptLineNumber & " : Frames=" & $iFrameCount & @CRLF)
61-
For $IDX_Frame = 0 To $iFrameCount -1
61+
For $IDX_Frame = 0 To $iFrameCount - 1
6262
ConsoleWrite("- IDX=" & $IDX_Frame & @CRLF)
6363
ConsoleWrite("- URL=" & $oWebV2M.GetFrameUrl($IDX_Frame) & @CRLF)
6464
ConsoleWrite("- NAME=" & $oWebV2M.GetFrameName($IDX_Frame) & @CRLF)
6565
ConsoleWrite(@CRLF)
6666
Next
67+
#EndRegion ; Example part 1 - testing NetWebView2Lib new methodes: .GetFrameCount() .GetFrameUrl($IDX_Frame) .GetFrameName($IDX_Frame)
6768

69+
#Region ; Example part 2 - testing NetWebView2Lib new methodes .GetFrameUrls() .GetFrameNames()
6870
ConsoleWrite("! " & @ScriptLineNumber & " : GetFrameUrls() :" & @CRLF & $oWebV2M.GetFrameUrls() & @CRLF)
6971
ConsoleWrite("! " & @ScriptLineNumber & " : GetFrameNames() :" & @CRLF & $oWebV2M.GetFrameNames() & @CRLF)
70-
For $IDX_Frame = 0 To $iFrameCount -1
72+
#EndRegion ; Example part 2 - testing NetWebView2Lib new methodes .GetFrameUrls() .GetFrameNames()
73+
74+
#Region ; Example part 3 - testing NetWebView2Lib new methodes .GetFrameHtmlSource($IDX_Frame)
75+
For $IDX_Frame = 0 To $iFrameCount - 1
7176
ConsoleWrite(@CRLF & "======================================================" & @CRLF)
72-
ConsoleWrite("! " & @ScriptLineNumber & " : GetFrameHtmlSource("&$IDX_Frame&") :" & @CRLF & $oWebV2M.GetFrameHtmlSource($IDX_Frame) & @CRLF)
77+
ConsoleWrite("! " & @ScriptLineNumber & " : GetFrameHtmlSource(" & $IDX_Frame & ") :" & @CRLF & $oWebV2M.GetFrameHtmlSource($IDX_Frame) & @CRLF)
7378
Next
7479
ConsoleWrite(@CRLF & "======================================================" & @CRLF)
7580
ConsoleWrite(@CRLF)
7681
ConsoleWrite(@CRLF)
77-
#EndRegion ; testing NetWebView2Lib new methodes
82+
#Region ; Example part 1 - testing NetWebView2Lib new methodes
83+
84+
#cs NOT SUPPORTED YET
85+
Local $oFrame0 = $oWebV2M.GetFrame(0)
86+
Local $oFrame1 = $oWebV2M.GetFrame(1)
87+
Local $oFrame2 = $oWebV2M.GetFrame(2)
88+
Local $oFrame3 = $oWebV2M.GetFrame(3)
89+
#CE NOT SUPPORTED YET
90+
7891

7992
#CS
8093
; just after navigate current context should be on top level Window
@@ -107,7 +120,7 @@ Func Main()
107120
If @error Then Return SetError(@error, @extended)
108121
#CE
109122

110-
#EndRegion - Testing how to manage frames
123+
#EndRegion ; Example part 1 - testing NetWebView2Lib new methodes
111124

112125
#CS
113126

0 commit comments

Comments
 (0)