This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Testing and the fly likes If statement for a checkbox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "If statement for a checkbox" Watch "If statement for a checkbox" New topic
Author

If statement for a checkbox

Claudiu Barbulescu
Greenhorn

Joined: Dec 04, 2012
Posts: 13
Hi,

I have a checkbox, that by default is not checked. Now, I write the below selenium rc script, but does not work as expected. When the script test the checkbox and this is not checked, I want to be checked in the else statement. Why this does not work?

Thank you!

Andrew Monkhouse
author and jackaroo
Marshal Commander

Joined: Mar 28, 2003
Posts: 11404
    
  81

The way I'm reading your code is:

Perhaps you did not mean to have the "not" (!) in the first part of the if statement?


The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: If statement for a checkbox
 
Similar Threads
selectOneRadio cannot be disabled using JavaScript
RememberMe on login page
jQuery: how to determine if any checkbox is checked.
please....help me in jsp checkbox display code
jQuery and checkbox