Please note that Sahi's development and support teams do not actively monitor this. This is more a community forum. If you are a Sahi Pro user looking for commercial support, please email support @ with your query.

Cannot find _button("foo", _in(_div("bar"))) with more than 3 nesting levels

edited September 2014 in Sahi - Open Source
For example, the DOM tree looks like this:
<div class="x-panel-mc-bwrap" id="ext-gen12">
  <div class="x-panel-mc-footer x-panel-mc-footer-noborder" id="ext-gen14">
    <div class="x-panel-btns-ct" id="ext-gen518" style="">
      <div class="x-panel-btns x-panel-btns-center" style="" id="ext-gen889">
        <table cellspacing="0"><tbody><tr>
          <td class="x-panel-btn-td" id="ext-gen15">
            <table border="0" cellpadding="0" cellspacing="0" class="x-btn-wrap x-btn x-btn-text-icon " id="ext-comp-1053" style="width: auto;"><tbody><tr>
              <td class="x-btn-left"><i>&nbsp;</i></td>
              <td class="x-btn-center" id="ext-gen520" style=""><em unselectable="on">
                <button class="x-btn-text" type="button" id="ext-gen17" style="background-image: url(;">Search</button>
              <td class="x-btn-right" id="ext-gen550"><i>&nbsp;</i></td>
          <td class="x-panel-btn-td" id="ext-gen23">
            <table border="0" cellpadding="0" cellspacing="0" class="x-btn-wrap x-btn x-btn-normal " id="ext-comp-1054" style="width: auto;"><tbody><tr>
              <td class="x-btn-left" id="ext-gen547"><i>&nbsp;</i></td>
              <td class="x-btn-center" id="ext-gen535"><em unselectable="on"><button class="x-btn-text" type="button" id="ext-gen25">Reset</button></em></td>
              <td class="x-btn-right"><i>&nbsp;</i></td>
      <div class="x-clear"></div>

Sahi can find the Search button when using:
_button("Search", _in(_div("ext-gen14")))
But it cannot find it when using:
_button("Search", _in(_div("ext-gen12")))
And it can find it again when using:
_button(0, _in(_cell("Search", _in(_div("ext-gen12")))))

Any body knows why does it happen? Is there any limitation of nesting levels in finding buttons inside some other elements (while not in finding cells)? Thanks a lot.

PS: I'm using the latest version of Sahi, the browser is IE8 on Windows 7, and my SUT is built with ExtJS 2.0.2.
Sign In or Register to comment.