Using Selenium in Java, I write a program that fills in some fields, clicks submit, etc. Everything was going fine until I came across such a thing. I need to insert text into one of the fields. I did it like this:
//Ищем ID поля ввода email и устанавливаем туда значение driver.findElement(By.id("Email")).sendKeys("vasya.antonov0274@gmail.com"); Faced a field in which I need to put a value, but which does not have a direct ID. I give the code of this block:
<div id="input-url">URL: <div class="errorbox-good"> <input name="urlnt" value="" size="25" maxlength="1000" type="text"> </div> </div> The value I need to insert into <input name="urlnt" value="" size="25" maxlength="1000" type="text"> . I know that in selenium, besides searching by ID, there are methods of searching by tag name, etc. but went through different options until I found the answer.