As we all are aware, data driven testing is one of the important aspects
we need to take care while designing any testing framework. There could be
different approaches of data Driven Testing in automation framework like
-
Reading
Test Data from properties file
-
Reading
Test Data from JSON File
- Using DataProvider
-
Reading
Test Data from excel
We already have seen in other blog, how to read data from properties
file and use it in our automation framework. Please refer this link to know about it.
We also have seen how to Read test data from JSON file. Please click on this
link.
In this blog, we will learn how to read data from Excel File and use
them in our protractor automation framework.
For reading data from excel file in protractor automation framework, we need to follow below steps:
2) Then we can create
one excel file inside our project and let's name it as GoogelTestData.With the
help of this excel file I will read the url of google home page then click on
Images link present on top of page and then do some search on google Search box.
3)
Now to Read this Excel File from our automation script we need to
provide the path and name xlsx file.
Below is my runner class to execute this automation scripts
Output of above code execution would Be:
Output of above code execution would Be:
How can we create excel file and write into it?
Reply