Few days back while giving an interview in some R&D company. The interviewer who took my interview asked me one question, how will you assert images in test method and I was unable to answer this question, cuz I had never used this in my automation till now. Let me put this in clear way!!
Question: In your test method how will you assert for image. Like assert that two given images are same or equal?
Answer: I was not having clear answer to this question. Just I told that we have to customize our Assert for images assert.
Then I come back and wrote piece of code to assert the image for AreEqual.
Here is the code. Thanks to interviewer who forced me to think about this.
Test Method:
Please feel free to provide your Feedback and comments!!
Thanks,
Md. Jawed
Question: In your test method how will you assert for image. Like assert that two given images are same or equal?
Answer: I was not having clear answer to this question. Just I told that we have to customize our Assert for images assert.
Then I come back and wrote piece of code to assert the image for AreEqual.
Here is the code. Thanks to interviewer who forced me to think about this.
Test Method:
Assert Class for Image(Assert.AreEqual)
Please feel free to provide your Feedback and comments!!
Thanks,
Md. Jawed