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.

how to verify alerts which can come from js?

gopalakrishnagopalakrishna Members
edited November -1 in Sahi - Open Source
i worked on registration form .after validating the error fields must show with red border?
how can i verify it?
after validation by inspecting element im getting class="populateVal hintTxt validName isError redBorder".


but its not in css,xpath,dom.
how can i verify it in automation?




wiating for quick reply.

Comments

  • narayannarayan Administrators
    Hi,

    The className is being dynamically populated via javascript.
    To verify the red border you could do:

    1)

    _assertEqual(_div("Your error field").className.indexOf("redBorder") != -1);

    2)

    _assertEqual(_style(_div("Your error field"), "border-color"), "#FF0000");

    (I am guess the color value for your red. Check what the Controller shows you and use that.)

    Regards,
    Narayan
Sign In or Register to comment.