How To Handle Dynamic Web Table In Selenium WebDriver
In this selenium web driver post, we will learn how to handle dynamic web table. There might occur some scenarios where every time a page loads with the different number of rows and columns or different columns for each row. fig1.1 selenium training in chennai For that, we have to put two for loops, 1. the first loop will iterate all the rows and 2. second loop inside it will iterate the columns of each row import java.util.List; import java.util.concurrent.TimeUnit; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; public class DynamicTable { WebDriver driver = new FirefoxDriver(); @BeforeTest public void setup() throws Exception { driv...
Comments
Post a Comment