Selenium with C# 66 - Selenium data driven testing using MS SQL as data source in MS Test

  Рет қаралды 5,853

Ankpro Training

Ankpro Training

Күн бұрын

Selenium data driven testing using MS SQL as data source in MS Test
#selenium #webdriver #automation #datadriventesting #qa
1:03 How to create a database table
2:12 Adding the data rows to the table
2:47 Code demo - Creation of test method
7:10 Test method execution
8:00 Possible interview questions on data driven testing using sql
Data driven testing using MS SQL and MS Test
How to create a database and table in MS SQL
Adding the data in to the table
Create a data driven test method which uses data from MS SQL table
Possible Interview Questions
1. How to use the MS SQL data as a source in selenium data driven testing?
2. What is a connection string?
3. What is the “Provider Invariant Name” for the MS SQL as data source?
Code :
[DataSource("System.Data.SqlClient",
"Server=.\\SQLExpress; Database=DataDrivenTesting;User Id=sa; Password=Ankpro01*",
"Student", DataAccessMethod.Sequential)]
[TestMethod]
public void DataDrivenTestingUsingSQL()
{
IWebDriver driver = new ChromeDriver();
driver.Manage().Window.Maximize();
driver.Url = "uitestpractice....";
driver.FindElement(By.Id("FirstName")).SendKeys(TestContext.DataRow[0].ToString().Trim());
driver.FindElement(By.Id("LastName")).SendKeys(TestContext.DataRow[1].ToString().Trim()); driver.FindElement(By.Id("EnrollmentDate")).SendKeys(TestContext.DataRow[2].ToString());
driver.FindElement(By.XPath("//input[@type='submit']")).Click();
Thread.Sleep(2000);
driver.Quit();
}

Пікірлер: 13
@AnkproTraining
@AnkproTraining 4 жыл бұрын
Thank you for watching. Cheers! would you mind hitting *_like_* button and *_subscribe_* to our channel! That will be awesome. We would be grateful to you. And also share this video in your circle via whatsapp, facebook and twitter. Video timeline : 1:03 How to create a database table 2:12 Adding the data rows to the table 2:47 Code demo - Creation of test method 7:10 Test method execution 8:00 Possible interview questions on data driven testing using sql
@rogerronan2222
@rogerronan2222 3 жыл бұрын
i realize I'm pretty randomly asking but does anyone know a good site to watch new series online ?
@elondamon9885
@elondamon9885 3 жыл бұрын
@Roger Ronan flixportal :D
@rogerronan2222
@rogerronan2222 3 жыл бұрын
@Elon Damon Thank you, I went there and it seems like a nice service :) Appreciate it !!
@elondamon9885
@elondamon9885 3 жыл бұрын
@Roger Ronan you are welcome xD
@KatRollo
@KatRollo 2 жыл бұрын
Is it possible to use DataSource to INSERT records instead?
@aatishlute4681
@aatishlute4681 2 жыл бұрын
Not run this program I try my local SQL server
@AnkproTraining
@AnkproTraining 2 жыл бұрын
Give the proper connection string. Thank you for watching this video. Don't forget to *_like , subscribe_* and hit that *_notification_* bell 🔔. And also share this video in your circle via *WhatsApp* , *Facebook* and *Twitter* . Link to subscribe the channel goo.gl/hFueBi
@swagatmishra9350
@swagatmishra9350 4 жыл бұрын
HOw to add wait time if the query is taking long time to execute. I am getting time out error in selenium as the query is taking longer time than expected.
@BP-xy4uy
@BP-xy4uy 3 жыл бұрын
Implicit wait
@aatishlute4681
@aatishlute4681 2 жыл бұрын
U run this program local server or live server
@xentechno2483
@xentechno2483 2 жыл бұрын
Can any one help me I try this but not run
@AnkproTraining
@AnkproTraining 2 жыл бұрын
You should give the proper connection string. Please let us know the error message you are receiving when the test case fails. Thank you for watching this video. Don't forget to *_like , subscribe_* and hit that *_notification_* bell 🔔. And also share this video in your circle via *WhatsApp* , *Facebook* and *Twitter* . Link to subscribe the channel goo.gl/hFueBi
Strange dances 😂 Squid Game
00:22
عائلة ابو رعد Abo Raad family
Рет қаралды 29 МЛН
Делаем с Никой слово LOVE !
00:43
Привет, Я Ника!
Рет қаралды 4,5 МЛН
It's the natural ones that are the most beautiful#Harley Quinn #joker
01:00
Harley Quinn with the Joker
Рет қаралды 22 МЛН
7 Database Design Mistakes to Avoid (With Solutions)
11:29
Database Star
Рет қаралды 102 М.
#17 - Data Driven Testing using NUnit for Selenium with C# .NET
10:45
Execute Automation
Рет қаралды 5 М.
SQL Tutorial for Beginners
44:57
Kevin Stratvert
Рет қаралды 2,3 МЛН
Database Testing : What is Database Testing
9:04
Testing World
Рет қаралды 54 М.
SQL Server Tutorial - One-to-many and many-to-many table relationships
9:51
Selenium Framework Tutorial #9 - Data Driven Testing with TestNG DataProvider
17:35
SQL Databases with Pandas and Python - A Complete Guide
16:59
Rob Mulla
Рет қаралды 153 М.
#1 - Introduction to Database Testing in Playwright with C# .NET
16:19
Execute Automation
Рет қаралды 2,2 М.