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.

Div element is highlighted but not clickable

nagarnagar Members
edited November -1 in Sahi - Open Source
Hi All,

In my application I have a div element which is displayed as similar to radio button on GUI. Sahi identifies this element by its class name as: "_div("deactive_active manageicon")", but the class name may get changed in forthcoming builds so I don't want to use its class name.

I am able to highlight this element by the code line:
_highlight(_div(0,_near(_link("NewIPSec")),_under(_label("Active"))));

but I am not able to click on this by using:
_click(_div(0,_near(_link("NewIPSec")),_under(_label("Active"))));

Nor it's reflecting its class name through the code line:
_div(0,_near(_link("NewIPSec")),_under(_label("Active"))).attributes.value;
OR
_div(0,_near(_link("NewIPSec")),_under(_label("Active"))).className


Below is the HTML snippet of the element:
<td nowrap="" align="center">
<div style="width: 20px;">
<div class="deactive_active manageicon" onclick="changeActiveStatus('NewIPSec','-1')" style="cursor: pointer;"></div>
</div>
</td>


Please help in resolving this problem. How can I click on this element.

Comments

  • Any help would be much appreciated.
  • Hi nagar,

    It seems like it is taking

    <div style="width: 20px;">
    <div class="deactive_active manageicon" onclick="changeActiveStatus('NewIPSec','-1')" style="cursor: pointer;"></div> this whole thing into consideration while clicking the div.

    Try Using:

    _click(_div(1,_near(_link("NewIPSec")),_under(_label("Active"))));

    Check if this solve your issue.

    Regards
    Sumitra
Sign In or Register to comment.