3
I am automating a page function and when it will click on the error image, finally I have tried several things, my doubt is the following the xPath that I am sending is correct?
<div id="toolbar">
<table cellspacing="1px" cellpadding="1px" width="100%" class="birtviewer_toolbar">
<tbody><tr><td></td></tr>
<tr>
<td width="6px">
</td><td width="15px">
<input type="image" name="toc" src="birt/images/Toc.gif" title="Comutar índice" alt="Comutar índice" class="birtviewer_clickable">
</td>
<!--
<TD WIDTH="6px"/>
<TD WIDTH="15px">
<INPUT TYPE="image" NAME='parameter' SRC="birt/images/Report_parameters.gif"
TITLE="Executar relatório"
ALT="Executar relatório" CLASS="birtviewer_clickable">
</TD>
<TD WIDTH="6px"/>
<TD WIDTH="15px">
<INPUT TYPE="image" NAME='export' SRC="birt/images/Export.gif"
TITLE="Exportar dados"
ALT="Exportar dados" CLASS="birtviewer_clickable">
</TD>
-->
<td width="6px">
</td><td width="15px">
<input type="image" name="exportReport" src="birt/images/ExportReport.gif" title="Exportar relatório" alt="Exportar relatório" class="birtviewer_clickable">
</td>
<td width="6px">
</td><td width="15px">
<input type="image" name="print" src="birt/images/Print.gif" title="Imprimir relatório" alt="Imprimir relatório" class="birtviewer_clickable">
</td>
<td align="right">
</td>
<td width="6px">
</td></tr>
</tbody></table>
</div>
Class I need to click
</td><td width="15px">
<input type="image" name="exportReport" src="birt/images/ExportReport.gif" title="Exportar relatório" alt="Exportar relatório" class="birtviewer_clickable">
</td>
xPathdriver.FindElement(By.XPath("//a[./img[@name='exportReport']tr[2]/td[4]/]")).Click();
Unfortunately it didn’t work.
– Guilherme Palange
found the input element ? or had some error?
– Marco Souza
returned null in input element
– Guilherme Palange
I did the debugging step by step, walked 28x the foreach returned ID, but did not enter if, not locating the src element
– Guilherme Palange
you have to debug and see how the item is being loaded, see other element properties to see if I find the correct one.
– Marco Souza
I did the mapping, I located a frame, I got inside the frame and I was able to use src thanks for the help
– Guilherme Palange