Manish Sharma
Manish Sharma

Reputation: 49

validation message still existing after enter text using SendKeys in selenium

Validation message is still existing after entering text using sendkeys.

Ex:

webDriver.FindElement(By.XPath("(//input[@id='UserID'])[3]")).SendKeys("erwrwrwrwer vvv");

Upvotes: 0

Views: 55

Answers (1)

RNS
RNS

Reputation: 625

First you need to replace FindElement with findElement, XPath with xpath and SendKeys with sendKeys.

You can replace following code with your code:

driver.findElement(By.xpath("(//input[@id='UserID'])[3]")).sendKeys("erwrwrwrwer vvv");

I have also observed that you are directly using webDriver.findElement

I think first you need to create driver as follows :

WebDriver driver ;
System.setProperty("webdriver.firefox.marionette","C:\\geckodriver.exe");
driver = new FirefoxDriver();

Hope this will help you.

Upvotes: 1

Related Questions