I have a webpage that is split into two datagrids. The left datagrid is structured like this:
<ul class="left_dg">
<li>
<ul></ul>
</li>
<li>
<ul></ul>
</li>
<li>
<ul></ul>
</li>
...
</ul>
The right datagrid, on the other hand, follows a simple 'ul-li' structure with a class called "right_dg". I am using dragAndDropToObject to move li-elements from the right datagrid to the left one. Here is an example of how it works:
<tr>
<td>dragAndDropToObject</td>
<td>css=.right_dg > li:nth-child(2)</td>
<td>css=.left_dg > li:nth-child(1) > ul</td>
</tr>
<tr>
<td>dragAndDropToObject</td>
<td>css=.right_dg > li:nth-child(2)</td>
<td>css=.left_dg > li:nth-child(2) > ul</td>
</tr>
<tr>
<td>dragAndDropToObject</td>
<td>css=.right_dg > li:nth-child(2)</td>
<td>css=.left_dg > li:nth-child(3) > ul</td>
</tr>
However, there seems to be an issue where
<td>css=.left_dg > li:nth-child(1) > ul</td>
selects a child of the second li-element instead of the first one.
Does anyone know how I can target a child of the first li-element instead? Your help is greatly appreciated as I am new to Selenium and still learning. Thank you.