Depending on the element which you have used, you can use the below code:
I hope this will help.
Want to become a Java Expert? Join Java Certification now!!
Want to know more about Java? Watch this video on Java Course | Java Tutorial for Beginners: