tags:

views:

40

answers:

1

I have a table called UserManagement that contains information about the user.This table gets updated whenever new user is created. If i create two users then i need check whether two users are actually created or not. Table contains ID,UserName,FirstName,LastName,Bdate..ctc. Here ID will be generated automatically.
I am running Selenium-TestNG script.Using Selenium,how can i get the UserName of the two users which i have created? Should i have to iterate through table? If so how to iterate through the table?

A: 

Use ISelenium.GetTable(string) to get the contents of the table cells you want. For example, selenium.GetTable("UserManagement.0.1"); will return the contents of the table's first row and second column. You could then assert that the correct username or usernames appear in the table.

Wesley Wiser