-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
__WD_Error() minimizing the amount of messages #290
Conversation
Waiting on your comments |
Please provide a short code snippet that demonstrates the behavior you describe. |
#include "z:\!!!_SVN_AU3\UDF_Forum\Other_Members\Official_AutoIt_Forum\WebDriver\____ORG_VESION\wd_helper.au3 "
;~ #include "..\wd_helper.au3"
$_WD_DEBUG = $_WD_DEBUG_Full
_WD_DeleteSession("")
The current version twicely says The main idea is to only All other function should'nt do that. |
What is strange to me is that:
|
I thought this was a pretty simple request, but the code you posted doesn't fulfill it. |
As you are probably already aware, |
Trim feature is good. |
I see your point. I have done some work in background. |
as for now using
ResponeText is not duplicated any more. |
I'm having some issues with the PR --
I will follow this up with a separate post outlining some alternative solutions. |
give me some time to answer.... work in progress in background..... |
Today I get
It was disscussed here: #254 (comment) in my opinion it should looks like:
And in case of success:
Who matters about RESPONSE text in LOG when Success was taken ? |
I would like to propose such changes: Local $sMessage = (($iResult Or $_WD_DEBUG > $_WD_DEBUG_Info) ? ("Full ResponseText=" & StringLeft($sResponseText, $_WD_RESPONSE_TRIM)) : (""))
Return SetError(__WD_Error($sFuncName, $iResult, $sMessage), 0, $sResponseText)
EndFunc ;==>__WD_Post the same for |
I merge to current realase, because I will post my current changes, and do not want to duplicate already accpeted changes in comparition modes. |
Using currently commited version, with this example: ;~ #include "z:\!!!_SVN_AU3\UDF_Forum\Other_Members\Official_AutoIt_Forum\WebDriver\____ORG_VESION\wd_helper.au3"
#include "wd_helper.au3"
ConsoleWrite("> TEST 1" & @CRLF)
$_WD_DEBUG = $_WD_DEBUG_Info
_WD_DeleteSession("")
ConsoleWrite("> TEST 2" & @CRLF)
$_WD_DEBUG = $_WD_DEBUG_Full
_WD_DeleteSession("")
I get this:
|
You'll need to be more specific as to which source code you mean. Your original statement was made before the changes in this PR, so I ran the code from
|
Currently commited in this PR |
Ok, But then I'm not understanding that the code is supposed to be demonstrating. Please explain what is should be looking for or what isn't functioning properly in your opinion. |
You was asking here: #290 (comment)
So I created such example using updated version from this PR. This version also follows the rules which was defined here: #280 (comment) So you can use wd_demo.au3 from my branch related to this PR to check if it works as it was defined in the link I mention before. |
Tidy moving this comments to fit indentation. To avoid thi I move them manually w lines below, and remove the work "check" as it is now after `If... Then`
@Danp2 I'm waiting on yours opinion here. |
full logging isn't enabled
Nice mod |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why didn't you perform the updates to $_WD_DEBUG outside of the While loop? That would also eliminate the logging associated with _WD_ExecuteScript.
Thanks. Good point. Please take a look on: |
Hope next few days we will be able to finally merge this PR as it takes us almost 3 months. |
This recent blog post is worth reading and could help with producing more manageable PRs. 😉 |
Pull request
Proposed changes
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
Please ensure you have read and noticed the checklist below.
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?
Currently UDF throws to many messages to console.
Very often they are duplicated.
for example $sResponseText is showed by
__WD_Delete
and_WD_DeleteSession
according to the ENUMS order:
$_WD_DEBUG_Error
should show less information than$_WD_DEBUG_Info
.But currently
$_WD_DEBUG_Info
shows only URLwhich means that
$_WD_DEBUG_Info
shows less information than$_WD_DEBUG_Error
which shows entire$sResponseText
What is the new behavior?
More user friendly information in case of
$_WD_DEBUG_Error
More detailed information in case of
$_WD_DEBUG_Info
or$_WD_DEBUG_Full
Not duplicated
$sResponseText
in console.Additional context
The debug flag may be helpful, but in all honesty it’s so verbose that whenever I’ve tried to look at it, it’s been like trying to find a needle in a haystack and I’m not familiar with the output so I don’t even know what the needle looks like…
System under test
Not related
Remarks:
This is only a modest begining of PR.
If you agree this direction of changes, then entire UDF should be reviewed in the same way.