File tree 1 file changed +7
-1
lines changed
1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -469,7 +469,13 @@ Func DemoCookies()
469
469
ConsoleWrite (" wd_demo.au3: (" & @ScriptLineNumber & " ) : Cookies (obtained at start after navigate) : " & $sAllCookies & @CRLF )
470
470
471
471
ConsoleWrite (" wd_demo.au3: (" & @ScriptLineNumber & " ) : WD: Get 'NID' cookie:" & @CRLF )
472
- Local $sNID = _WD_Cookies($sSession , ' Get' , ' NID' )
472
+ Local $hTimer = TimerInit ()
473
+ Local $sNID
474
+ While 1
475
+ $sNID = _WD_Cookies($sSession , ' Get' , ' NID' )
476
+ If Not @error Or TimerDiff ($hTimer ) > 5 * 1000 Then ExitLoop
477
+ Sleep (100 ) ; this cookie may not exist at start, may appear later when website will be estabilished, so there is need to wait on @error and try again
478
+ WEnd
473
479
ConsoleWrite (" wd_demo.au3: (" & @ScriptLineNumber & " ) : Cookie obtained 'NID' : " & $sNID & @CRLF )
474
480
475
481
Local $sName = " TestName"
You can’t perform that action at this time.
0 commit comments