Unable to use xpath “The method xpath(String) in the type By is not applicable for the arguments (String, String)’

When I tried XPath locator to find an element, getting “The method XPath(String) in the type By is not applicable for the arguments (String, String)’ error

I have changed the Java compiler Version as well(from 1.6 to 1.7) but still getting the same error. can anyone help me with this?

Thanks in Advance

Default Asked on November 21, 2018 in Program QA Automation.
Add Comment
  • 1 Answer(s)

    Write the correct xpath┬ádriver.findElement(By.xpath(“//*[@id=un]”)).sendKeys(“900001”);

    Default Answered on November 27, 2018.
    Add Comment
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.