Simple way to handle Webtable in Selenium Web Automation
Steps/coding/dom inspecting logic:
- Right Click and Inspect html for table
- Identify the patern for colum 1 of table
- Carefully observe the xpath of column 1 row 1 to row 3
- Notice that xpath has “tr[1]/td[1]”, “tr[2]/td[1]” , “tr[3]/td[1]” etc for following rows in colmn 1
- Use For loop and replace tr[1],tr[2],tr[3] with for loop variable “i”