简体   繁体   English

Selenium RC Java-isElementPresent不起作用

[英]Selenium RC Java - isElementPresent not working

I have the following problem... 我有以下问题...

For a while now i noticed a bug in isElementPresent function in selenium RC 2.0a5. 一段时间以来,我注意到硒RC 2.0a5中isElementPresent函数中的错误。

It works only half of the time or so. 它仅在一半左右的时间内起作用。

I have wait before it i have pageload before it and i made sure that the id is NOT dynamically generated. 我已经等了它,然后才进行页面加载,并确保该ID不是动态生成的。 Still... 仍然...

I do a waitForElementToAppear which is implemented using the Waiter in Selenium... http://release.seleniumhq.org/selenium-remote-control/0.9.0/doc/java/com/thoughtworks/selenium/Wait.html 我做了一个使用Selenium中的Waiter实现的waitForElementToAppear ... http://release.seleniumhq.org/selenium-remote-control/0.9.0/doc/java/com/thoughtworks/selenium/Wait.html

And then when i'm trying to use the element OR doing an isElementPresent check... It sometimes fails to use that element although i do have a screenshot of it being there.. 然后,当我尝试使用该元素或进行isElementPresent检查时,尽管我确实有屏幕截图,但有时无法使用该元素。

Also i tried using Thread.sleep to wait out. 我也尝试使用Thread.sleep等待。 It sometimes works, sometimes not. 它有时起作用,有时不起作用。

So do you guys encountered the same problem too? 你们也遇到同样的问题吗?

Current Selenium RC version is 1.0.3. 当前的Selenium RC版本是1.0.3。 What you are using is a WebDriver remote server, so you shouldn't use it with your Selenium RC tests - stay on RC 1.0.3. 您正在使用的是WebDriver远程服务器,因此您不应该在Selenium RC测试中使用它-保持RC 1.0.3的状态。 Selenium Server 2.0a5 is for the RemoteWebDriver. Selenium Server 2.0a5适用于RemoteWebDriver。 And also 2.0a5 is Alpha release, so you should expect bugs Alpha版本也发布了2.0a5,因此您应该期待Bug

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM