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 detect an active & inactive GUI-Element in sahi?

bosshr1043bosshr1043 Members
edited November -1 in Sahi - Open Source
Hello,

I ahve several tab sheets in a web-page.Foreach functionality each tab's label or name is activated and appear in bold and its corresponding details are displayed below,and at the same time other tab's heading or names are inactive.

How can i test that in Sahi script?

Thanks in advance.

Comments

  • narayannarayan Administrators
    Look at the className of the element and assert it.

    Suppose your tab is identified as _div("Tab 1")
    On the controller, type _div("Tab 1").className and check what its value is. Check for another tab which is not highlighted and see if the classNames are different.

    If they are different, then use _assertEqual("highlightedClassName", _div("Tab 1").className)
  • its not happening for me.

    my tabs are like this:-
    _click(_link("Fare Search[1]"));
    _click(_link("Schedule[1]"));

    with their heading as their name.

    and i am unable to get the class name for them using controller also.
  • narayannarayan Administrators
    Look for some attribute which is different between the highlighted and non-highlighted tabs. You could paste a part of html code here, so that we can help you. Or you can email me the HTML.
Sign In or Register to comment.