I could reach all elements by driver.findElement()
function.
Tree elements were created using dhtmlx library and when I try to reach them I get NoSuchElementException.
I tried to reach by id, xpath, class, text, etc. but none of them worked for me. I also tried implicit waiting and Thread.sleep()
methods but the result is the same.
> <tr> <td class="standartTreeImage"> <img border="0" align="absmiddle"
> style="padding: 0px; margin: 0px; width: 18px; height: 18px;"
> src="http://marduk:5543/atlas/themes/third_party/dhtmlx/dhtmlxTree/codebase/imgs/vse_datasources/plus3.gif">
> </td> <td width="20px" style="display: none;"> <img align="absmiddle"
> src="http://marduk:5543/atlas/themes/third_party/dhtmlx/dhtmlxTree/codebase/imgs/vse_datasources/iconUncheckAll.gif"
> style="width: 16px; height: 16px;"> </td> <td
> class="standartTreeImage" style="width: 18px;"> <img border="0"
> align="absmiddle" style="padding: 0px; margin: 0px; width: 18px;
> height: 18px;"
> src="http://marduk:5543/atlas/themes/third_party/dhtmlx/dhtmlxTree/codebase/imgs/vse_datasources/folderClosed.gif">
> </td> <td class="standartTreeRow" nowrap="" style="width: 100%;
> font-size: 10pt; cursor: pointer;"> <span class="standartTreeRow"
> style="padding-left: 5px; padding-right: 5px;">hr-istanbul [15]</span>
> </td> </tr>
For example one of them is this: I need to click the first td
. Only locator is the image but I can not access the element .. NoSuchElementException.
element = driver.findElement(By.xpath("//img[contains(@src,'http://marduk:5543/atlas/themes/third_party/dhtmlx/dhtmlxTree/codebase/imgs/vse_datasources/plus3.gif')]"));
Also tried to reach last column element it didnt work either.
element = driver.findElement(By.xpath("//*[contains(text(), 'hr-istanbul [15]')]"));