0

a few days from now I am trying to write a selenium ide test for a data structure tree. I stuck with expanding tree nodes, the main thing is that there is a lot of TreeExpandoIcons of the same class, no id, text, type and so on.

    <tbody>
<tr>
<td title="Control + right arrow key to expand this row." aria-expanded="false" aria-readonly="true" role="gridcell" tabindex="-1" aria-describedby="RestartPageGrid-Id" colid="Id" class="gridxCell" style="width:auto;min-width:auto;max-width:auto;">
<div class="gridxTreeExpandoCell " style="padding-left: 16px;">
<div class="gridxTreeExpandoIcon " style="margin-left: 0px;">
<div class="gridxTreeExpandoInner">+</div></div>
<div class="gridxTreeExpandoContent gridxCellContent">1</div>
</div>
</td>

There is always only one difference between icons, near icon is gridxCellContent number . But It is only near and it is not clickable. Maybe you know some workaround or how to solve this problem? I would be very appreciated.

My selenium ide offers, to write like this:

<tr>
    <td>click</td>
    <td>css=div.gridxTreeExpandoIcon.</td>
    <td></td>
</tr>

But this code isn't working.

Satnam
  • 23
  • 1
  • 7

1 Answers1

0

There are few queries I have : 1. Have you tried removing the last (.) in the css selector ? 2. Also i see that "gridxTreeExpandoIcon " class has a trailing space. Are you aware of using contains in css selectors? 3. Have you tried using different location strategy ? such as xpath, //div[contains(@class,'gridxTreeExpandoIcon')]

Jitendra
  • 716
  • 6
  • 10
  • Thanks, for trying to help me. I should use ClickAt() instead on Click(). – Satnam Sep 06 '16 at 14:08
  • @satnam any feedback on my questions ? How `ClickAt()` solved it. please add an explanation. if my answer was of any help then please upvote it. – Jitendra Sep 16 '16 at 15:57