How to validate checkbox in Selenium IDE?



  • I am new to Selenium IDE. I want to do validations for the checkbox. I have tried the below code <tr> <td>mouseOver</td> <td>name=viewIndex</td> <td>356</td> <tr> <td>click</td> <td>name=viewIndex</td> <td>356</td> </tr> It is executing the result as [info] Executing: |mouseOver | name=viewIndex | 356 | But there is no progress on my webpage.



  • I would use Selenium Builder instead of Selenium IDE. If your script was exported as Java, then you just do this: WebElement checkbox = driver.findElement( By,id('the_id' ) ); if ( checkbox.isSelected() ) { System.out.println("Checkbox was already selected: " + checkbox.toString() ); } else { checkbox.click(); } I use this project template to run my Builder scripts.



Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2