Handling Text box
We can enter text into text box by using the method sendKeys(Char Seq...). First , we need to find then element in the web page for entering the text.
Example : In the below example i will explain how to enter the username and password in Facebook
Handling Buttons
There are two ways of handling the buttons.
1 . By using click() method
2 . sendKeys(Keys.ENTER
Example : I will explain how to click on login button using click() method and sendKeys(Keys.ENTER)
Handling Check box
Using the method click() , we can check the check the check box
Example : I will explain how to click the 'Keep me logged in' check box in Facebook login page

.png)


No comments:
Post a Comment