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 determine test the color of a specified link in SAHI.

dashboarddashboard Members
edited October 2013 in Sahi - Open Source
How to determine test the color of a specified link in SAHI.

Answers

  • _assertExists(_link("Products"));
    _mouseOver(_link("Products"));
    _assertExists(_link("SQL Diagnostic Manager"));
    _mouseOver(_link("SQL Diagnostic Manager"));
    _assertEqual("red",_link("SQL Diagnostic Manager").style.color);

    The above code is not working in www.idera.com

    Regards
    Uday
  • var $color = _style(_link("SQL Diagnostic Manager,"color"); //or other properties like background-color or any other property present in your application
    Will this help?
  • Hi Bhavitha

    Thanks very much.The script is working.I guess I have print the variable color after this.

    Regards
    Uday
  • Is the following code correct?

    _assertExists(_link("Products"));
    _mouseOver(_link("Products"));
    _assertExists(_link("SQL Diagnostic Manager"));
    _mouseOver(_link("SQL Diagnostic Manager"));
    var $color = _style(_link("SQL Diagnostic Manager","color"));
    _print();


    Regards
    Uday
Sign In or Register to comment.