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.

_click and visibility

tower120tower120 Members
edited November -1 in Sahi - Open Source
Hi!

I have one simple question. When we use _click - it wait till element appear on the page, but does it wait for element visibility? Or I should do something like this:

_wait(5000, _isVisible( _byId("myElement") ));
_click ( _byId("myElement"));

?

Comments

  • narayannarayan Administrators
    Hi,

    It waits till availability not visibility. If it causes a problem, then add the wait, else don't bother.

    You can make Sahi honour only visible elements by setting
    element.visibility_check.strict=true
    in sahi/userdata/config/userdata.properties

    But use this with caution: when hidden elements become visible, they can change the indexing of other elements.

    Regards,
    Narayan
  • "they can change the indexing of other elements."

    What indexing? What this means? This will affect on speed only?
  • narayannarayan Administrators
    About indexing:

    If you have 3 textboxes they will be indexed as _textbox(0) _textbox(1) _textbox(2)

    If you make _textbox(1) hidden, then:

    with strict visibility false, you will see the other two as _textbox(0) _textbox(2)

    with strict visibility true, you will see the other two as _textbox(0) _textbox(1)

    So you see that _textbox(2) is now identified as _textbox(1) because the middle one became invisible.

    This generally does not affect the speed.

    Hope that helps,

    Regards,
    Narayan
Sign In or Register to comment.