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.

Problem with dojo dialog

KareemJKareemJ Members
edited May 2010 in Sahi - Open Source
Hello,

1. Problem with _in and _near
In my web application, I'm using dojo. I have a dojo dialog popping up at some point.
When the dialog is on, and I try to click the first checkbox in a certain div by using this:
_click(_checkbox(0, _in(_div("div_id_1"))));
Sahi clicks on a checkbox in the dimmed background of the dialog box (That checkbox is not in "div_id_1" at all).

There are many ways to overcome such a thing but I want to point out at the fact that _in and _near don't work with dojo dialogs.

Comments

  • narayannarayan Administrators
    Hi Kareem,

    We have used _in and _near with various dojo widgets and they work as designed.

    _in and _near are based on DOM hierarchy and nearness. Most probably the div_id_1 is encompassing a lot of other elements too and not just that element you wish to identify. You will have to narrow it down further to something smaller. Btw, if _checkbox(0, _in(_div("div_id_1"))) does not work, try _checkbox(1, _in(_div("div_id_1"))), may be that will fit in.

    Regards,
    Narayan
  • KareemJKareemJ Members
    That works now.. I think I just needed to restart sahi. Thanks for the reply. This can b closed
This discussion has been closed.