Could not automate “Sex” type from “”

Could not automate “Sex” type from “”.

My code snippet is:

boolean defalt = false;

defalt = radioBtn.get(0).isSelected();
if(defalt == true){

And i get the below error message:

Exception in thread “main” java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at AutomationTest.CheckRadioButton.main(

Please help me to resolve this problem.

Default Asked on May 15, 2017 in Selenium WebDriver.

Please paste the entire code.

on May 16, 2017.
Add Comment
  • 0 Answer(s)
  • Your Answer

    By posting your answer, you agree to the privacy policy and terms of service.