0
_assertEqual("/" + "887.90" + "/", 887)

The above code is not working. We are using Sahi pro automation tool, a JavaScript-based tool.

Kindly suggest how to handle the assertion.

MJH
  • 2,301
  • 7
  • 18
  • 20
Ashok
  • 115
  • 3
  • 8

1 Answers1

2

The API _assertEqual works like this:

_assertEqual($expected, $actual[, $message])

Now I am not sure if you are using correct values for expected and actual or not, but try this:

_assertEqual("/887.90/", "887");

Just note that this will give you false. This is because you are saying that 887 should match a pattern like 887.90, which comes out as false. I think what you may be looking for is:

_assertEqual("887.90", "/887/");
Vivek V Dwivedi
  • 2,510
  • 2
  • 28
  • 39