English 中文(简体)
webdriver 找不到文本字段元素
原标题:Selenium webdriver cant find text field element

Webdriver 找不到下面的元素 。 我尝试了使用名称和 xpath, 但没有工作 。 我使用红宝石( 但无关紧要) 需要一种方法来识别下面的页面对象 。

<input name="description" maxlength="128" value="" onmouseover="hoverField(this)"   onmouseout="jjj" onblur="blurField(this)" onfocus="focusField(this)" class="formInputFieldFilled" type="text">
问题回答

这对我管用,用XPath:

//input[@name= description ]

我会冒险猜它很可能 在另一个Iframe, 所以双重检查这一点。

这也可能是一个问题, 因为该元素在当时的页面上看不到, 所以请查看WebDriver Wait:

http://seleniumhq.org/docs/04_webdriver_advanced.html





相关问题
Javascript communication with Selenium (RC)

My Application has a lot of calculation being done in JavaScript according to how and when the user acts on the application. The project prints out valuable information (through console calls) as to ...

Running automated Web browser tests under Hudson

I m running Hudson for my automated builds and love it. I d now like to create automated Web browser tests using either WaTiN (preferred) or Selenium. As my Hudson runs as a Windows service (under ...

Using a Java library with Scala reserved words

I m using an external library written in Java (Selenium). One of the function calls has the signature type(String, String), and I keep getting compiler errors when trying to call it from Scala, that ...

Heightened privilege selenium browsers on Windows 7 (x64)

I make use of *firefox and *iexplore etc. within my selenium tests to get around the issue of self-signed SSL certificates on my local machine. Unfortunately, now that I ve moved from XP over to 7, ...

Selenium not working with Firefox 3.x on linux

I am using selenium-server , selenium rc for UI testing in my application . My dev box is Windows with FireFox 3.5 and every thing is running fine and cool. But when i try to run selenium tests on my ...

Selenium IDE: Incrementing values by 1 and 71

Currently I m incrementing a value called wert by 1 with the following code: getEval storedVars[ wert ]=${wert}+1; The value wert is something like 80401299. I want to add 1 to the value, if it ...

热门标签