j8583 How to get debugString after parseMessage - j8583

When I get the debugString() of an IsoMessage that I build, it works fine, but when I try to get the debugString() of an IsoMessage that was created by parsing (mf.parseMessage(..)) the debugString() is empty.
The parsing works fine, and the field values are there, but the debugString() returns empty string.
Am I missing something?
Isn't it possible to print the debugString of a parsedMessage?

Any message should be able to print its debugString. This must be a bug.
UPDATE so this is weird, because I just added a simple test to check for this, and it passes:
https://github.com/chochos/j8583/commit/3a32b9041470c31a451791f3baa082f18204504a

The problem seems to be Eclipse's console.
The debugString starts with a non printable character which seems to cause the problem.
When run standalone, the debugString gets printed ok like this:
^#p023060180...
(Notice the ^#p at the begining).

Related

waitForText is not working to locate text but waitUntil works

I am getting ready to pull my hair out. Not sure what I am doing wrong but here is the issue:
I have a textbox for which I am verifying an error message for. The html looks something like this:
<span class="text-field-error" data-valmsg-for="Name" data-valmsg-replace="true"><span id="Name-error" class="">There are invalid characters being used.</span></span>
My xpath to locate the error message looks something like this:
//span[#id='Name-error']
I am using the following command to verify the error message:
driver.waitForText('//span[#id='Name-error']','There are invalid characters being used.')
This verification fails.
However, when I try the following command, it works fine.
driver.waitUntil('//span[#id='Name-error']',"_.innerText.includes('There are invalid characters being used.')")
I have verified there is no hidden whitespace in the first instance. I have to use waitForText vs waitUntil to keep up with coding standards within my project.
Please advise, Peter.
I have no idea, maybe it is a bug. If you can provide a way to replicate, that will help the community: https://github.com/karatelabs/karate/tree/develop/examples/ui-test
Meanwhile see if this works:
waitForText('body', 'There are invalid characters being used')
I can't help noticing that you are not using double-quotes when needed.
waitForText("//span[#id='Name-error']", 'There are invalid characters being used')

Illegal character in query when doing a conditional GET with multiple parameters

While using Karate DSL version 0.9.2, I can send a conditional get with multiple parameters with no problem.
Something like 'Given path 'get?condition=payment_plan='B' and equal_paymnt_flg='D''', will work perfectly fine.
However on version 1.0.1 the same will produce an error, Illegal character in query at index 84, and the call will fail.
Any ideas why?
Please try 1.1.0.RC4 and if there is still a problem it can be a bug we need to fix.
More details here: https://github.com/intuit/karate/issues/1561

SendKeys() method ignores some characters when sending to a text box

I move my Selenium installation to a new server, since then some tests using logins no longer work.
After investigation, I found that the password field was populated with an incorrect value. Therefore the tests failed.
I'm trying to do the following :
_passWordTextBox.Clear();
_passWordTextBox.SendKeys("!!ä{dasd$352310!!!\\_XY>èà$£<?^^");
Here is how the field is populated after those lines:
The "!" character was the only one missing. It worked on the previous server. Some other suspicious characters (like $ éà<) also worked.
I've looked at locale settings (culture differences) between the servers.
From these characters sent in a Password string:
!"#$%&'()*+,-./0123456789:;<=>?#ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~
All of these worked correctly:
"#$%&'()*+,-./0123456789:;<=>?#ABCDEFGHIJKLMNOPQRSTUVWXYZ[\ _ abcdefghijklmnopqrstuvwxyz{|}
Only these failed to be sent correctly:
!]^`~
I've also tried in other fields (such as a Description field) and see the same failure.
I've tried to see if the command was sent correctly to the selenium server, but the logs seem to suggest it worked:
08:05:35.850 DEBUG [ReverseProxyHandler.execute] - To upstream: {"value":["!\"#$%&'()*+,-./0123456789:;<=>?#ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~?"]}
It means that the server receives the command correctly, but for some reason the driver or the server doesn't execute properly.
Try this:
_passWordTextBox.SendKeys(#"!!ä{dasd$352310!!!\\_XY>èà$£<?^^");
Maybe is for the validates from field.
You can try using clipboard:
public static void SendValueFromClipboard(this IWebElement txtField, string value)
{
Clipboard.SetText(value);
txtField.SendKeys(OpenQA.Selenium.Keys.Control + "v");
}
This is written on C#, you will need to rewrite it in language, you are using.
After looking into multiple system settings i discovered that both my piloting and executing machine add the same regional settings (Format : French(Switzerland) , Keyboard : French(Switzerland), and I didn't look any further.
While fiddling around i discovered this setting :
As it turns out , the Language for non-Unicode programs was set to French(Switzerland) on the machine executing the tests. Changing it to English(UK) resolved the problem.
Probably a bug in chromedriver.
Your solution doesn't work for me, since I already have that setting set to English, but here's a solution I found if anyone else's interested.
Just change your keyboard to ENG UK in task bar.

Drone segment in URL cannot contain colon

I got the below error while setting up Drone CI.
myid:bin domain$ drone info parse
“http://drone5.internal.com/”/api/user: first path segment in URL
cannot contain colon
I searched online for answer but didnt get the right one.
Finally I found that it was due to the URL syntax I am getting the error.
while setting up the variables dont use double quotes.
export DRONE_SERVER="https://drone5.internal.com" is wrong.
But
export DRONE_SERVER=https://drone5.internal.com will work perfectly

Trying to get node-webkit console output formatted on terminal

Fairly new to node-webkit, so I'm still figuring out how everything works...
I have some logging in my app:
console.log("Name: %s", this.name);
It outputs to the browser console as expected:
Name: Foo
But in the invoking terminal, instead I get some fairly ugly output:
[7781:1115/085317:INFO:CONSOLE(43)] ""Name: %s" "Foo"", source: /file/path/to/test.js (43)
The numerical output within the brackets might be useful, but I don't know how to interpret it. The source info is fine. But I'd really like the printed string to be printf-style formatted, rather than shown as individual arguments.
So, is there a way to get stdout to be formatted either differently, or to call a custom output function of some sort so I can output the information I want?
I eventually gave up, and wrapped console.log() with:
log = function() {
console.log(util.format.apply(this, arguments));
}
The actual terminal console output is done via RenderFrameHostImpl::OnAddMessageToConsole in chromium, with the prefix info being generated via LogMessage::Init() in the format:
[pid:MMDD/HHMMSS:severity:filename(line)]
The javascript console.log is implemented in console.cc, via the Log() function. The printf style formatting is being done at a higher level, so that by the time the Log() function (or similar) are called, they are only passed a single string.
It's not a satisfying answer, but a tolerable workaround.
I was looking to create a command line interface to go along side my UI and had a similar problem. Along with not logging the values as I wanted I also wanted to get rid of the [pid:MMDD/HHMMSS:severity:filename(line)] output prefix so I added the following:
console.log = function (d) {
process.stdout.write(d + '\n');
};
so that console logging was set back to stdout without extra details. Unfortunately also a work around.