I want to locate an element by its id in my webpage which is a text field where I enter a name. So the element is :
<input type="text" id="a110_name" name="name" maxlength="255">
The first time, my test works well. If I add a loop to click again to the element, selenium does not find because the id has changed.
ex: the id is changing each time I click on it.
<input type="text" id="a110_name" name="name" maxlength="255">
<input type="text" id="a120_name" name="name" maxlength="255">
my code:
driver.findElement(By.id("a110_name")).sendKeys("test");
How can I resolve this problem?