Perform Operations on WebElements

      Perform Operations on WebElements

 click()

Purpose: This is used to click on webelements like link,button,radio group,checkbox,images…etc.

sendKeys()

Purpose: This is used to sending inputs into text fields and text areas.And also used to select value from the drop down box.

clear()

Purpose: This is used to clear the input from existing data.

getText()

Purpose: This is used to capture text of the webElement.

 getTagName()

Purpose: This is used to capture html tag of the webElement.

getLocation()

Purpose: This is used to capture X and Y co-ordinates of webelement in the application.

isSelected()

Purpose: This is used to check,is the check-box is currently checked or unchecked to checked Radio buttons are selected or not.

 isDisplayed()

Purpose: This is a boolean condition.It is used to either an element is visible or not.

If an element is displayed it gives true and an element is not displayed it gives false.

isEnabled()

Purpose: This is a boolean condition.It is used to either an element is enable or not.

If an element is enable it gives true and an element is disable it gives false.

getAttribute ()

Purpose: This is used to capture the attributes which are present in web applications.

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *