This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Testing and the fly likes Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark ""verifyElementNotPresent" in Selenium RC" Watch ""verifyElementNotPresent" in Selenium RC" New topic

"verifyElementNotPresent" in Selenium RC

Claudiu Barbulescu

Joined: Dec 04, 2012
Posts: 13

I want to use a while loop in selenium RC and command : "verifyElementNotPresent"

Let's say for this scenario: while an element or text is not present in the page, the script to click on a button or to type on a field.

1. If I write like this: while(selenium.isElementPresent("id=ui_user")); is for "verifyElementPresent" and the script can't make difference between: "verifyElementNotPresent" and "verifyElementPresent"

2. If I write like this: while(verifyFalse(selenium.isElementPresent("id=ui_user"))); can't compile the code because Eclipse tell me: "Type mismatch: cannot convert from void to boolean. The method verifyFalse(boolean) from the type SeleneseTestCase is deprecated"

Example: while(verifyFalse(selenium.isElementPresent("id=ui_user"))) {
selenium.type("name=username", "UserTest");

So, how can I resolve this?

Thank you!
It is sorta covered in the JavaRanch Style Guide.
subject: "verifyElementNotPresent" in Selenium RC
Similar Threads
test case for servlets
what are solvents in selenium?
simple question about selenium
Are Selenium FlowControl, include, and DataDriven Selenium IDE Extensions still usable
Watij or HttpUnit?