Forum Discussion

hngnango's avatar
Occasional Contributor
7 years ago

String comparaison result not consistant : sometime Pass sometime fail

Hi  !


I did below  logic in script assertion


if (actualBankName == expectedBankName){
else {


In my   output  file  below , the first row is showing 'Fail' instead of Pass.


Question: Is there anyway to "TRIM" string value prior to compare ,to make sur to have exact match ?

I do not understand why  my first row is showing Fail.

Please advise


Result RequestTimeTaken(sec) ActualBankName ExpectedBankName BLZCode
Fail 0.392 Deutsche Bank Ld Brandenburg Deustche Bank Ld Brandenburg 12070000
Pass 0.233 Raiffeisenbank Hallertau Raiffeisenbank Hallertau 70169693
Fail 0.219 Landesbank Baden-Württemberg WGZ Bank 67050000