[x] I have read and noticed the CONTRIBUTING document
[ ] I have added necessary documentation or screenshots (if appropriate)
Types of changes
Please check x the type of change your PR introduces:
[ ] Bugfix (change which fixes an issue)
[x] Feature (change which adds functionality)
[ ] Code style update (formatting, renaming)
[ ] Refactoring (functional, structural)
[ ] Documentation content changes
[ ] Other (please describe)
What is the current behavior?
When you want to switch to $_WD_DEBUG_Full and then back then you do not must remember which level was set previously.
What is the new behavior?
this following example shows new behavior:
_MAIN()
Func _Main()
$_WD_DEBUG = $_WD_DEBUG_None ; presetting
_1()
EndFunc
Func _1()
_WD_DebugSwitch($_WD_DEBUG_Full) ; first usage - internally store current settings + switch to $_WD_DEBUG_Full
; do your stuff
_2()
_WD_DebugSwitch() ; switch back to prior DEBUG level .... $_WD_DEBUG_None
EndFunc
Func _2()
_WD_DebugSwitch($_WD_DEBUG_Error) ; switch to $_WD_DEBUG_Error
; do your stuff
_WD_DebugSwitch() ; switch back to prior DEBUG level .... $_WD_DEBUG_Full
EndFunc
Pull request
Proposed changes
This PR adds function
_WD_DebugSwitch()
which give an easy way to switch and switch back between $_WD_DEBUG levels.Checklist
Types of changes
Please check
x
the type of change your PR introduces:What is the current behavior?
When you want to switch to
$_WD_DEBUG_Full
and then back then you do not must remember which level was set previously.What is the new behavior?
this following example shows new behavior:
Additional context
https://www.autoitscript.com/forum/topic/205553-webdriver-udf-help-support-iii/?do=findComment&comment=1504312 This feature was discussed before here: https://github.com/Danp2/au3WebDriver/pull/340
System under test
not related