I have the following problem
when trying to assert that the data obtained from the view is equal to the data from the testdata (csv file) I have already tried using “assert” or “WebUI.verifyMatch” or “Assert.assertEquals()” or “Assert.assertTrue”
in all attempts error occurs when the tested data is from a csv file, thank you for your help.
erro log /
console log /
There are several questions on the forum that give “answers” but the easiest is the following one (which just adds the “toString()” modifier onto your Strings). Easy enough to try:
This works for me :
String variable1 = WebUI.getAttribute(findTestObject(‘XXXXX’), ‘checked’, FaiilureHandling.OPTIONAL)
String variable2 = findTestData(‘YYYY’).getValue(1, 4)
Hi grylion54, if you check in a commented code snippet I had already made this conversion attempt, but without success,
error log /
You should try to trim the value to remove whitespace characters.
placa variable or the
placaview variable may contain 0x8203 (UNICODE zero-width-whitespace) character, which is invisible
I was interested in what is ?? in Resident??s.
I wrote a code to examine it.
Path projectDir = Paths.get(RunConfiguration.getProjectDir())
but using only trim I had no success.
But it reminded me that the csv file can contain dirt, so I used replaceAll and was successful, thanks a lot for the help!