0

I'm using TestNG and using iterator to get data from excel.

I have many usernames mentioned in excel and each user has different permissions.

For example, User1 has access to Screen1, Screen2 and Screen3 of tab. User2 has access to Screen 1,2 but not 3 of tab

So I have created a class that will work for both users, but the problem here is that the Screen 3 is not available for User2, so webdriver always fails the test which shows up on report, this is something I don't want.

Is there any way to skip Screen3 test case for User2?

Thanks

user3563252
  • 27
  • 2
  • 6

1 Answers1

0

Good morning, I suggest to use groups discrimination in test annotation. For example you cans see this thread: Is it possible to put a condition to TestNG to run the test if that is member of two groups?

thanks for your attention.

Community
  • 1
  • 1
Drow
  • 11
  • 5