0

I need to enter a value in the textbox by using XPath with Selenium automated scripts.

Please help to correct my code.

IWebElement name= driver.FindElement(By.XPath("//input[@type='text' and @name='name']"));
name.SendKeys("juana");  
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
  • [Read on Selenium](https://www.softwaretestinghelp.com/selenium-find-element-by-text/) here and see how they use `text()` to check the data. `driver.findElement(By.xpath("//*[text()='Write and Earn']"));` – Jawad Feb 19 '20 at 20:28
  • This will search for the Text Box containing the text "Write and Earn",right? I need to push value to the Text Box. – Nimya John Feb 20 '20 at 23:06
  • Yes. Once you find that element, update the inner text of that element with the new value – Jawad Feb 20 '20 at 23:16

0 Answers0