user4147617
user4147617

Reputation: 3

Getting RemoteWebDriver error

I am not using Selenium RC or Remote WebDriver, but When I am trying to run my test , its throwing me error -

remotewebdriver.unpackAndThrowOnError(Response errorResponse)

My script has simple code:

driver.FindElement(By.XPath("xpath");

Error thrown at:

RemoreWebDriver.FindelementByXPath(String XPath);

Please help me resolving the issue

Upvotes: 0

Views: 870

Answers (1)

JimEvans
JimEvans

Reputation: 27496

Because of the architecture of WebDriver, all discrete browser-specific drivers (FirefoxDriver, ChromeDriver, etc.), are subclasses of RemoteWebDriver. This means that, in keeping with good Object-oriented programming principles, the error handling code is common to all implementations, and is located in the base class, or RemoteWebDriver. This means that in the stack trace for any error, it’s common, even expected, to see RemoteWebDriver methods in the call stack.

Having said all of this, I suspect that the question you’re really asking is not, “Why do I see RemoteWebDriver in my stack trace when I’m not using remote?” Rather, I suspect the question you’re asking is, “Why is my FindElement call failing?” The answer to that depends on a lot of factors, but the most common is that the element isn’t located by the locator you’re specifying, or that the element isn’t actually in the page’s DOM when you attempt to find it. In the former case, you should fix the locator; in the latter case, you should wait for the element to be present before finding it (usually by using WebDriverWait, or a similar construct).

Of course, without the HTML you’re attempting to automate, and the full WebDriver code you’re attempting to use, more detailed advice is impossible to provide.

Upvotes: 1

Related Questions