Following are the some API functions and it implementation
1. How to click on element: By using click() function we perform click operation on page element:
2. How to enter text into page element: By using sendkeys() function we enter text in page element such as text field, area etc:
3. How to count total number rows in table:
1. How to click on element: By using click() function we perform click operation on page element:
WebElement el = driver.findElement(By.id("ElementID"));
el.click();
WebElement el = driver.findElement(By.id("ElementID"));
el.clear(); //use to clear input
field
el. sendKeys (“User name”);
3. How to count total number rows in table:
List rows =
driver.findElements(By.className("//table[@id='tableID']/tr"));
int totalRow = rows.size();