Answer the question
In order to leave comments, you need to log in
Selenium sendKeys operator not working, what is the reason?
Using IntelliJ IDEA, I set an autotest, and text should be entered in the element, but it is not entered, using the sendKeys operator.
Construction -
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.chrome.ChromeDriver;
import java.nio.charset.StandardCharsets;
import java.time.Duration;
public class FirstTest {
@Test
public void firstTest() {
System.setProperty("webdriver.chrome.driver", "C:\\Users\\79259\\Desktop\\Testing\\Soft\\chromedriver.exe");
ChromeDriver driver = new ChromeDriver();
driver.get("https://yandex.ru ");
WebElement element = driver.findElement(By.xpath(".input__control input__input mini-suggest__input"));
element.sendKeys("Hi!");
}
}
When doing element.click( ) - the field is highlighted, but I try to make text and nothing happens...
Google selenium driver matches the version of Google browser.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question