Rajbala Rani
Rajbala Rani

Reputation: 3

InvalidSelectorException while trying to identify web element in robot framework

ign-In | FAIL | InvalidSelectorException: Message: The given selector xpath=//*[@id='user_email'] is either invalid or does not result in a WebElement. The following error occurred: InvalidSelectorError: Unable to locate an element with the xpath expression xpath=//*[@id='user_email'] because of the following error: TypeError: The expression cannot be converted to return the specified type. Stacktrace: at FirefoxDriver.annotateInvalidSelectorError_ (file:///var/folders/5f/6mvs5x1j37s5q3_38kjfwkgr0000gn/T/tmp1Nrpuj/webdriver-py-profilecopy/extensions/[email protected]/components/driver-component.js:10633) at FirefoxDriver.prototype.findElementsInternal_ (file:///var/folders/5f/6mvs5x1j37s5q3_38kjfwkgr0000gn/T/tmp1Nrpuj/webdriver-py-profilecopy/extensions/[email protected]/components/driver-component.js:10691) at FirefoxDriver.prototype.findElements (file:///var/folders/5f/6mvs5x1j37s5q3_38kjfwkgr0000gn/T/tmp1Nrpuj/webdriver-py-profilecopy/extensions/[email protected]/components/driver-component.js:10695) at DelayedCommand.prototype.executeInternal_/h (file:///var/folders/5f/6mvs5x1j37s5q3_38kjfwkgr0000gn/T/tmp1Nrpuj/webdriver-py-profilecopy/extensions/[email protected]/components/command-processor.js:12534) at DelayedCommand.prototype.executeInternal_ (file:///var/folders/5f/6mvs5x1j37s5q3_38kjfwkgr0000gn/T/tmp1Nrpuj/webdriver-py-profilecopy/extensions/[email protected]/components/command-processor.js:12539) at DelayedCommand.prototype.execute/< (file:///var/folders/5f/6mvs5x1j37s5q3_38kjfwkgr0000gn/T/tmp1Nrpuj/webdriver-py-profilecopy/extensions/[email protected]/components/command-processor.js:12481)

Upvotes: 0

Views: 1876

Answers (1)

har07
har07

Reputation: 89315

This part of the error message explained why :

The given selector xpath=//*[@id='user_email'] is either invalid or does not result in a WebElement.

In this case, //*[@id='user_email'] is valid XPath expression, so it must be no element matched by that XPath. That's all I can tell from the information provided.

Upvotes: 0

Related Questions