2016-02-19 38 views
0

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)InvalidSelectorException而試圖識別機器人框架腹板元件

+0

他是HTML代碼:

+1

您的輸入字段可能位於iframe中嗎? –

+0

由於XPath是有效的,我相信你已經擊中了Firefox webdriver中的錯誤。我曾經偶爾在IE中得到這個。這是否一貫可重現? – ombre42

回答

0

錯誤消息的這部分解釋了爲何:

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

在這種情況下,//*[@id='user_email']是有效的XPath表達式,所以它必須由沒有元素匹配那個XPath。從我提供的信息中我可以看出這一點。

+0

這是HTML代碼: –

+0

Nooooo。不要在評論中發佈HTML。使用HTML編輯您的問題並正確格式化 – har07