public void Check_Assign_Role_Correct() { try { var models = this.GetCurrentData(); if (models.Count > 0) { var firstRow = models[0]; this.Login = new LoginPage(this.Driver, this.CurrentTest); //Verify login page title string loginPageTitle = this.Login.GetLoginTitle(); var p1 = firstRow.P1; var p2 = firstRow.P2; var p3 = firstRow.P3; Assert.AreEqual(p3, loginPageTitle.ToLower()); //login to application this.Login.LoginToHome(p1, p2); this.Login.CheckForHome(); // go the next page Home = new HomePage(this.Driver, this.CurrentTest); var classData = Home.ChangeToAdmin(firstRow.P5); //Assert.AreEqual(firstRow.P6, classData); UserManagement = new UserManagementPage(this.Driver, this.CurrentTest); UserManagement.ClickOnUserManagementAgain(); UserManagement.ValidateUserPage(firstRow.P7); UserManagement.ClickAssignRole(); UserManagement = new UserManagementPage(this.Driver, this.CurrentTest); UserManagement.ValidateRolePage(firstRow.P8); var assignRole = new AssignRoleModel(this.Driver, this.CurrentTest); assignRole.ValidateRolePage(firstRow.P9); assignRole.AssignRole(firstRow.P10, firstRow.P11, firstRow.P12, firstRow.P13); Home.GetUserLoggedOut(); this.TestPassed("Test passed"); } } catch (Exception ex) { this.LogException(ex); throw; } }