i've been trying to find the correct xpath for a elemt during 2 days and i couldn't get the element. this is the webcode <div class="login-block last"> <form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)"> <form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)"> <table width="290" align="center"> <tbody> <tr> <tr> <tr> <tr> <tr> <tr> <tr> <th align="right"> <td align="left"> <input id="rutClient" name="rutClient" size="15" onchange="Rut(document.frm.rutClient.value)" onblur="Rut(document.frm.rutClient.value)" type="text"> </td> </tr> <tr> <tr> <tr> </tbody> </table> <div class="login-block last"> <form name="frm" action="authenticatorProcess.cgi" method="post" onsubmit="return validate_form(this)"> <table width="290" align="center"> <tbody> <tr> <tr> <tr> <tr> <tr> <tr> <tr> <th align="right"> <td align="left"> <input id="rutClient" name="rutClient" size="15" onchange="Rut(document.frm.rutClient.value)" onblur="Rut(document.frm.rutClient.value)" type="text"> </td> </tr> <tr> <tr> <tr> </tbody> </table> I tried with the following by.xpath(//form[@name='frm']//input[@type='text'])//*[@id='rutClient'] //html/body/div[1]/form/table/tbody/tr[7]/td/input/by.id("rutClient")