I am trying to click inside a text boxthat is inside a div which itself is inside a table. I have tried numerous approaches but none seems to work
This is the code for the element:
<tr valign="top"><td id="xNEPk-chdex" style="height:100%"><div id="xNEPk" class="labelRowCnt z-div"><span id="xNEPm" class="z-label">Username:</span></div></td><td id="xNEPk-chdex2" class="z-hbox-separator"><img style="height:0;width:0"></td><td id="xNEPl-chdex" style="height:100%"><div id="xNEPl" class="compRowCnt z-div"><input id="xNEPn" class="login z-textbox" autocomplete="off" value="" type="text" name="j_username"></div></td></tr>
I cannot go with the element ID as the element ID keeps changing every time I refresh the page
I have tried the following method some of which are
element =wait.until(EC.element_to_be_clickable((By.XPATH,'//div[@class=".compRowCnt.z-div"]/input[@class=".login.z-textbox"]')))
element.click()
element = driver.find_element_by_class_name("login.z-textbox")
element.click()
element =wait.until(EC.element_to_be_clickable((By.NAME,"j_username")))
element.click()
But none seems to work. Every time I get element not found.
I want to be able to click inside the textbox so that I can provide my username using send keys.
Can anyone please help me? I am using chrome