au3WebDriver
au3WebDriver copied to clipboard
_WD_LoadWait() enhancements
I think we should provide new feature for _WD_LoadWait()
as there can be cases that you would like to wait not for complete
but for interactive
or even loaded
will be enough to continue processing like there was no error.
Reference: https://www.w3schools.com/jsref/prop_doc_readystate.asp
uninitialized - Has not started loading
loading - Is loading
loaded - Has been loaded
interactive - Has loaded enough to interact with
complete - Fully loaded
Related: https://www.autoitscript.com/forum/topic/208640-webdriver-udf-help-support-iv/?do=findComment&comment=1506254
I know that pageLoadStrategy
can be used in capability string
https://www.w3.org/TR/webdriver2/#dfn-waiting-for-the-navigation-to-complete
https://www.selenium.dev/documentation/webdriver/capabilities/shared/
But I mean that it would be helpfull to change _WD_LoadWait
behavior on the fly without touching capabilities.
If you agree then I open separate Issue for this.
Originally posted by @mlipok in https://github.com/Danp2/au3WebDriver/issues/362#issuecomment-1225545526
Please treat this PR: 384 _WD_LoadWait - better error handling as separate things.
btw. I have also a plan to:
Add support for checking all frames in _WD_LoadWait
but firstly 362 _WD_FrameList must be merged.
Please treat this https://github.com/Danp2/au3WebDriver/pull/384 as separate things.
That was my plan. However, it seems to me that your changes in that PR go beyond "better error handling". IMO, that task could have been accomplished with this one line of code --
If $iErr Then $iErr = $_WD_ERROR_Exception
In my opinion $iExt
is also related to ERROR handling.
EDIT: Also $sMessage
usage is related to ERROR handling.
IMO those changes are related more to logging / debugging than error handling.
IMO those changes are related more to logging / debugging than error handling.
Agree. But this was my intention so I change the PR title to be more in line with the changes:
From _WD_LoadWait - better error handling
to _WD_LoadWait - better error handling and logging
you can assign this issue to me
I think we should provide new feature for
_WD_LoadWait()
as there can be cases that you would like to wait not forcomplete
but forinteractive
or evenloaded
will be enough to continue processing like there was no error.
It was proposed here: https://github.com/Danp2/au3WebDriver/pull/392
Please keep further discussion in this regards in the mentioned PR
btw. I have also a plan to: Add support for checking all frames in
_WD_LoadWait
but firstly 362 _WD_FrameList must be merged.
this part is still required to be done, as next step. And for this reason this issue still has to be open.