Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.7k points)

When I enter text into the text field it gets removed.

Here is the code:

String barcode="0000000047166";

WebElement element_enter = _driver.findElement(By.xpath("//*[@id='div-barcode']"));

element_enter.findElement(By.xpath("//html/body/div[1]/div[3]/div[1]/form/div/div/input")).sendKeys("barcode");

1 Answer

0 votes
by (62.9k points)

Use this code.

driver.FindElement(By.XPath(".//[@id='header']/div/div[3]/div/form/input[1]")).SendKeys("25025");

Browse Categories

...