-
Notifications
You must be signed in to change notification settings - Fork 263
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to get connect with DB in selenium MSTESTV2? #576
Comments
@shirishnagarnz mstest v2 doesn't restrict you from connecting to a DB. you can connect to DB in the same way as you will do in a normal console app. The connection of DB code will vary from DB engine to engine. Search for samples on how to connect to DB via c# and you should find something |
@shirishnagarnz as mentioned above, mstest v2 doesn't restrict you from doing that. Depending on the db you're planning to connect to it, you would have to use a specific library that help you doing that. There's a ton of example on the internet if you look for "how to connect to a sql database from c#". Below is a short snippet that you could use right away to get connected to a SQL Server db:
Of course, for the above code to work, you should have a SQL Server with a database on it. And the user/password part is optional, but you have to specify in the connectionString that you'd like to use Hope it helps getting this resolved! |
@shirishnagarnz I am closing the issue. If you have any other queries do open another issue |
Description
The text was updated successfully, but these errors were encountered: