[Solved] How to retrieve integer value from field in selenium?


Looking at your code you are trying to print the element itself.

 System.out.println(FatherNum);

If you want to print the value of that field , you can do it by :

 System.out.println(FatherNum.getAttribute("value"));

OR

 String Fathernum= FatherNum.getAttribute("value"); 
 System.out.println(Fathernum);

See the doc for getAttribute – see link

1

solved How to retrieve integer value from field in selenium?