18 January 2026:


This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.



Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.

Assertion for the images

lnvsagarlnvsagar Members
edited November -1 in Sahi - Open Source
When there is an assertion for the image, the assertion is passing even though it should fail as per the steps given in the script.

1. assert(_isVisible(_img(""))) is passing for image eventhough it should fail.

2. _assertExists(_image(""")) is not at all identified by the controller during the test.

Please let me know how to proceed.

I need to assert the image since i have multiple customers for the same product, when i run the test i have only one option of asserting the image from where i can navigate to that particular customer script.

Thanks in advance

OS- Windows 7
Browser- IE 8
Sahi Build - Sahi Pro 3.6 (Build: 2011-05-31)

Comments

  • try this

    _assertEqual(_image("add.gif"), _image("add.gif", _in(_parentRow(_cell("a1")))));
    _assertEqual(_image("add.gif"), _image(0, _in(_parentRow(_cell("a1")))));
    _assertEqual(_image("add.gif[1]"), _image("add.gif", _in(_parentRow(_cell("a2")))));
    _assertEqual(_image("add.gif[1]"), _image(0, _in(_parentRow(_cell("a2")))));

    you can find it from demo in.sah
  • No that didnt worked..
Sign In or Register to comment.