0

I am new to selenium and C#. I need help. Thanks How to check if username exists before adding in the system using Selenium Webdriver and C#

closed as unclear what you're asking by FDM, IAmMilinPatel, ECiurleo, alecxe Oct 20 '17 at 12:28

Please clarify your specific problem or add additional details to highlight exactly what you need. As it's currently written, it’s hard to tell exactly what you're asking. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Please edit your question to give more information: without knowing how your system actually works, it's not possible to give you anything more than general guidance. – Kate Paulk Oct 20 '17 at 11:28
2

Two choices:

Black box. If you don't have access to the program environment and don't have the ability to check behind the scene with database calls then you need to do what a regular user would do - use the system. Write a test that tries to a user and verify that you get the error message that the user already exists. If necessary use the web interface to add a user and then use it again to try adding the user again and verify that you get the user already exists error message.

White Box. If you have at least some access to program internals or the database you can use those approaches to check if a user exists or add a user as desired before using the web application

Not the answer you're looking for? Browse other questions tagged or ask your own question.