0

I tried to click on a button by using the buttons XPath in C# Selenium. But in C# it shows the below error. I don't know what to do I am new this platform. So kindly help me with this.

Image of the Error

1 Answer 1

1

Nothing but I just removed the double quotes. Instead I used the single quotes for [@id='content'].

IWebElement search = driver.FindElement(By.XPath("//*[@id='content']/div/form/div[2]/div[4]/a"));
search.Click();
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.