SlideShare a Scribd company logo
1 of 8
TestAutomationSeries
Turgay Koklu
Founder, Principle Consultant
K-Tech Solutions Inc.
E: turgay.koklu@kokluteknoloji.com
P: (+90) 532 442 5210
Istanbul-TURKEY
Assembly::OpenQA.Selenium,Microsoft.Office.Interop.Excel
Class::ChromeDriver,Excel
Methods
2. Excel.Workbook
3. Excel.Worksheet
4. Exdel.Range
Turgay Koklu
Founder, Principle Consultant
K-Tech Solutions Inc.
E: turgay.koklu@kokluteknoloji.com
P: (+90) 532 442 5210 Istanbul-TURKEY
AUTOMATION TEST SCENARIO:
1. Automation shall browse to Delta Airlines main web page via
https://www.delta.com
2. Finds Item «One Way» reservation and selects it.
3. Fills up the following flight information from an external excel data sheet;
I. FROM
II. TO
III. DEPART DATE
4. Finds Item «Find Flights» button and clicks on it.
5. Repeat step-1 to step-4 for the test data stored in an excel sheet below
Turgay Koklu
Founder, Principle Consultant
K-Tech Solutions Inc.
E: turgay.koklu@kokluteknoloji.com
P: (+90) 532 442 5210 Istanbul-TURKEY
This video tutorial is NOT prepared for introductory purpose. We assume that
audiences have already had background on Selenium and C# technologies.
Before we move forward, please make sure you have below pre-requisites which
have been downloaded and installed into your development environment.
 Selenium Web Driver (version >3.0.0)
 Chrome Web Driver (one of the latest versions suitable for your operating
system)
 Internet Explorer Driver (one of the latest versions suitable for your operating
system)
 NUnit Framework (any version greater than 2.6.4)
 NUnit Test Adapter (version 2.x for NUnit framework >= 2.x)
Let’s get started.
Turgay Koklu
Founder, Principle Consultant
K-Tech Solutions Inc.
E: turgay.koklu@kokluteknoloji.com
P: (+90) 532 442 5210 Istanbul-TURKEY
Include all necessary assemblies
into your class file.
Define Excel spread sheet
objects to work with.
Define two integer fields for
holding number of rows and columns
used in excel.
Turgay Koklu
Founder, Principle Consultant
K-Tech Solutions Inc.
E: turgay.koklu@kokluteknoloji.com
P: (+90) 532 442 5210 Istanbul-TURKEY
Initialize your driver and catchErrors objects.
Initialize excel workbook, worksheet,
range objects. In workbook object,
make sure your excel file is located in
a valid directory (i.e. C:UsersFile.xlsx).
Finally, set your row and count
variables
to respected count values from Excel
Range object.
Turgay Koklu
Founder, Principle Consultant
K-Tech Solutions Inc.
E: turgay.koklu@kokluteknoloji.com
P: (+90) 532 442 5210 Istanbul-TURKEY
Include this block of codes in your test method.
Turgay Koklu
Founder, Principle Consultant
K-Tech Solutions Inc.
E: turgay.koklu@kokluteknoloji.com
P: (+90) 532 442 5210 Istanbul-TURKEY
Create you Tear Down method to make sure all drivers closed, shutted-down and all excell
processes and events are released/closed.
Let Garbage Collection collects all non-used objects.
Turgay Koklu
Founder, Principle Consultant
K-Tech Solutions Inc.
E: turgay.koklu@kokluteknoloji.com
P: (+90) 532 442 5210 Istanbul-TURKEY
Build and run your test!!

More Related Content

Similar to Selenium Test Automation series - Data Driven Testing-From Excel Sheet

( 13 ) Office 2007 Coding With Excel And Excel Services
( 13 ) Office 2007   Coding With Excel And Excel Services( 13 ) Office 2007   Coding With Excel And Excel Services
( 13 ) Office 2007 Coding With Excel And Excel Services
LiquidHub
 
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
Chengjen Lee
 
Instructions 3-5 pages double space research paper about Eric Sc.docx
Instructions 3-5 pages double space research paper about Eric Sc.docxInstructions 3-5 pages double space research paper about Eric Sc.docx
Instructions 3-5 pages double space research paper about Eric Sc.docx
normanibarber20063
 
NS2: Binding C++ and OTcl variables
NS2: Binding C++ and OTcl variablesNS2: Binding C++ and OTcl variables
NS2: Binding C++ and OTcl variables
Teerawat Issariyakul
 

Similar to Selenium Test Automation series - Data Driven Testing-From Excel Sheet (20)

Techorama 2017 - Testing the unit, and beyond.
Techorama 2017 - Testing the unit, and beyond.Techorama 2017 - Testing the unit, and beyond.
Techorama 2017 - Testing the unit, and beyond.
 
Ehab_adly
Ehab_adlyEhab_adly
Ehab_adly
 
( 13 ) Office 2007 Coding With Excel And Excel Services
( 13 ) Office 2007   Coding With Excel And Excel Services( 13 ) Office 2007   Coding With Excel And Excel Services
( 13 ) Office 2007 Coding With Excel And Excel Services
 
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
將 Open Data 放上 Open Source Platforms: 開源資料入口平台 CKAN 開發經驗分享
 
bmcv
bmcvbmcv
bmcv
 
Advanced Testing with TTCN-3 and UML Testing Profile
Advanced Testing with TTCN-3 and UML Testing ProfileAdvanced Testing with TTCN-3 and UML Testing Profile
Advanced Testing with TTCN-3 and UML Testing Profile
 
Building Python Applications on Windows Azure
Building Python Applications on Windows AzureBuilding Python Applications on Windows Azure
Building Python Applications on Windows Azure
 
Entity Framework v2 Best Practices
Entity Framework v2 Best PracticesEntity Framework v2 Best Practices
Entity Framework v2 Best Practices
 
Find Anything In Your APEX App - Fuzzy Search with Oracle Text
Find Anything In Your APEX App - Fuzzy Search with Oracle TextFind Anything In Your APEX App - Fuzzy Search with Oracle Text
Find Anything In Your APEX App - Fuzzy Search with Oracle Text
 
Oracle to Netezza Migration Casestudy
Oracle to Netezza Migration CasestudyOracle to Netezza Migration Casestudy
Oracle to Netezza Migration Casestudy
 
Sourav_Das
Sourav_DasSourav_Das
Sourav_Das
 
Comparing the performance of a business process: using Excel & Python
Comparing the performance of a business process: using Excel & PythonComparing the performance of a business process: using Excel & Python
Comparing the performance of a business process: using Excel & Python
 
Agile Data Science
Agile Data ScienceAgile Data Science
Agile Data Science
 
Instructions 3-5 pages double space research paper about Eric Sc.docx
Instructions 3-5 pages double space research paper about Eric Sc.docxInstructions 3-5 pages double space research paper about Eric Sc.docx
Instructions 3-5 pages double space research paper about Eric Sc.docx
 
Exachk and oem12c
Exachk and oem12cExachk and oem12c
Exachk and oem12c
 
Ef Poco And Unit Testing
Ef Poco And Unit TestingEf Poco And Unit Testing
Ef Poco And Unit Testing
 
Enrich Your Models With OCL
Enrich Your Models With OCLEnrich Your Models With OCL
Enrich Your Models With OCL
 
NS2: Binding C++ and OTcl variables
NS2: Binding C++ and OTcl variablesNS2: Binding C++ and OTcl variables
NS2: Binding C++ and OTcl variables
 
Terraform modules restructured
Terraform modules restructuredTerraform modules restructured
Terraform modules restructured
 
Terraform Modules Restructured
Terraform Modules RestructuredTerraform Modules Restructured
Terraform Modules Restructured
 

Recently uploaded

Recently uploaded (20)

Effective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeConEffective Strategies for Wix's Scaling challenges - GeeCon
Effective Strategies for Wix's Scaling challenges - GeeCon
 
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
Navigation in flutter – how to add stack, tab, and drawer navigators to your ...
 
[GRCPP] Introduction to concepts (C++20)
[GRCPP] Introduction to concepts (C++20)[GRCPP] Introduction to concepts (C++20)
[GRCPP] Introduction to concepts (C++20)
 
Novo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMsNovo Nordisk: When Knowledge Graphs meet LLMs
Novo Nordisk: When Knowledge Graphs meet LLMs
 
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
Abortion Clinic In Johannesburg ](+27832195400*)[ 🏥 Safe Abortion Pills in Jo...
 
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
Abortion Clinic In Pongola ](+27832195400*)[ 🏥 Safe Abortion Pills In Pongola...
 
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCAOpenChain Webinar: AboutCode and Beyond - End-to-End SCA
OpenChain Webinar: AboutCode and Beyond - End-to-End SCA
 
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit MilanWorkshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
Workshop: Enabling GenAI Breakthroughs with Knowledge Graphs - GraphSummit Milan
 
Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?Prompt Engineering - an Art, a Science, or your next Job Title?
Prompt Engineering - an Art, a Science, or your next Job Title?
 
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
Anypoint Code Builder - Munich MuleSoft Meetup - 16th May 2024
 
Weeding your micro service landscape.pdf
Weeding your micro service landscape.pdfWeeding your micro service landscape.pdf
Weeding your micro service landscape.pdf
 
From Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST APIFrom Theory to Practice: Utilizing SpiraPlan's REST API
From Theory to Practice: Utilizing SpiraPlan's REST API
 
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
[GeeCON2024] How I learned to stop worrying and love the dark silicon apocalypse
 
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
CERVED e Neo4j su una nuvola, migrazione ed evoluzione di un grafo mission cr...
 
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
Abortion Pill Prices Turfloop ](+27832195400*)[ 🏥 Women's Abortion Clinic in ...
 
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
Abortion Clinic In Pretoria ](+27832195400*)[ 🏥 Safe Abortion Pills in Pretor...
 
Encryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key ConceptsEncryption Recap: A Refresher on Key Concepts
Encryption Recap: A Refresher on Key Concepts
 
Software Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements EngineeringSoftware Engineering - Introduction + Process Models + Requirements Engineering
Software Engineering - Introduction + Process Models + Requirements Engineering
 
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4jGraphSummit Milan - Visione e roadmap del prodotto Neo4j
GraphSummit Milan - Visione e roadmap del prodotto Neo4j
 
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
Abortion Pill Prices Germiston ](+27832195400*)[ 🏥 Women's Abortion Clinic in...
 

Selenium Test Automation series - Data Driven Testing-From Excel Sheet

  • 1. TestAutomationSeries Turgay Koklu Founder, Principle Consultant K-Tech Solutions Inc. E: turgay.koklu@kokluteknoloji.com P: (+90) 532 442 5210 Istanbul-TURKEY Assembly::OpenQA.Selenium,Microsoft.Office.Interop.Excel Class::ChromeDriver,Excel Methods 2. Excel.Workbook 3. Excel.Worksheet 4. Exdel.Range
  • 2. Turgay Koklu Founder, Principle Consultant K-Tech Solutions Inc. E: turgay.koklu@kokluteknoloji.com P: (+90) 532 442 5210 Istanbul-TURKEY AUTOMATION TEST SCENARIO: 1. Automation shall browse to Delta Airlines main web page via https://www.delta.com 2. Finds Item «One Way» reservation and selects it. 3. Fills up the following flight information from an external excel data sheet; I. FROM II. TO III. DEPART DATE 4. Finds Item «Find Flights» button and clicks on it. 5. Repeat step-1 to step-4 for the test data stored in an excel sheet below
  • 3. Turgay Koklu Founder, Principle Consultant K-Tech Solutions Inc. E: turgay.koklu@kokluteknoloji.com P: (+90) 532 442 5210 Istanbul-TURKEY This video tutorial is NOT prepared for introductory purpose. We assume that audiences have already had background on Selenium and C# technologies. Before we move forward, please make sure you have below pre-requisites which have been downloaded and installed into your development environment.  Selenium Web Driver (version >3.0.0)  Chrome Web Driver (one of the latest versions suitable for your operating system)  Internet Explorer Driver (one of the latest versions suitable for your operating system)  NUnit Framework (any version greater than 2.6.4)  NUnit Test Adapter (version 2.x for NUnit framework >= 2.x) Let’s get started.
  • 4. Turgay Koklu Founder, Principle Consultant K-Tech Solutions Inc. E: turgay.koklu@kokluteknoloji.com P: (+90) 532 442 5210 Istanbul-TURKEY Include all necessary assemblies into your class file. Define Excel spread sheet objects to work with. Define two integer fields for holding number of rows and columns used in excel.
  • 5. Turgay Koklu Founder, Principle Consultant K-Tech Solutions Inc. E: turgay.koklu@kokluteknoloji.com P: (+90) 532 442 5210 Istanbul-TURKEY Initialize your driver and catchErrors objects. Initialize excel workbook, worksheet, range objects. In workbook object, make sure your excel file is located in a valid directory (i.e. C:UsersFile.xlsx). Finally, set your row and count variables to respected count values from Excel Range object.
  • 6. Turgay Koklu Founder, Principle Consultant K-Tech Solutions Inc. E: turgay.koklu@kokluteknoloji.com P: (+90) 532 442 5210 Istanbul-TURKEY Include this block of codes in your test method.
  • 7. Turgay Koklu Founder, Principle Consultant K-Tech Solutions Inc. E: turgay.koklu@kokluteknoloji.com P: (+90) 532 442 5210 Istanbul-TURKEY Create you Tear Down method to make sure all drivers closed, shutted-down and all excell processes and events are released/closed. Let Garbage Collection collects all non-used objects.
  • 8. Turgay Koklu Founder, Principle Consultant K-Tech Solutions Inc. E: turgay.koklu@kokluteknoloji.com P: (+90) 532 442 5210 Istanbul-TURKEY Build and run your test!!