lefthandedgoat / canopy

f# web automation and testing library, built on top of Selenium (friendly to c# also)
http://lefthandedgoat.github.io/canopy/
MIT License
506 stars 115 forks source link

HTML Reporter does not pass the case even if condition is true #475

Closed RutujaNagare closed 4 years ago

RutujaNagare commented 5 years ago

Hi,

I Tried below code to verify the expected value and actual value are equal, even though my values are matching canopy is failing my condition.

Could you please check and suggest a solution?

Canopy_Error

lefthandedgoat commented 5 years ago

You are using == which takes a selector and makes sure that it has the right values.

In your code, you are reading the value and trimming it, and then treating that as a selector.

You will want to use === instead which does not think its receiving a selector and then doing the comparison, it just does a simple comparison.

Read more here: http://lefthandedgoat.github.io/canopy/assertions.html

RutujaNagare commented 5 years ago

I tried with '===' operation and this solution works for me. Thank you so much.