This PR adds function _WD_DebugSwitch() which give a way to switch and switch back between $_WD_DEBUG levels.
Checklist
Put an x in the boxes that apply. If you're unsure about any of them, don't hesitate to ask. We are here to help!
This is simply a reminder of what we are going to look for before merging your code.
[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 must rember what level was set previously.
What is the new behavior?
this following example shows new behavior:
_MAIN()
Func _Main()
; presetting
$_WD_DEBUG = $_WD_DEBUG_None
_1()
; restore settings ($_WD_DEBUG_None)
_WD_DebugSwitch()
; set new debug level
$_WD_DEBUG = $_WD_DEBUG_Error
; reset switch internall storage to new setting ($_WD_DEBUG_Error)
_WD_DebugSwitch(Null)
EndFunc
Func _1()
; first usage - internally store current settings + switch to $_WD_DEBUG_Full
_WD_DebugSwitch($_WD_DEBUG_Full)
; do your stuff
_2()
; do your stuff
EndFunc
Func _2()
; switch to $_WD_DEBUG_Error
_WD_DebugSwitch($_WD_DEBUG_Error)
; do your stuff
EndFunc
Pull request
Proposed changes
This PR adds function
_WD_DebugSwitch()
which give a way to switch and switch back between $_WD_DEBUG levels.Checklist
Put an
x
in the boxes that apply. If you're unsure about any of them, don't hesitate to ask. We are here to help!This is simply a reminder of what we are going to look for before merging your code.
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 must rember what 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
System under test
not related