Quantcast
Channel: Visio General Questions and Answers for IT Professionals forum
Viewing all articles
Browse latest Browse all 2333

not able to connect to a csv file to my coded ui test for data driving in visual studio ultimate 2013

$
0
0

added the csv file to my solution and then added the following code

[DataSource("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\data.csv", "data#csv", DataAccessMethod.Sequential), DeploymentItem("data.csv"), TestMethod]

  I get the error to add a closing bracket after data source, which I do as below

[DataSource]("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\data.csv", "data#csv", DataAccessMethod.Sequential), DeploymentItem("data.csv"), TestMethod]

now I get an error message that declaration is expectedfor datasource

complete code below

Public Class CodedUITest1


[DataSource]("Microsoft.VisualStudio.TestTools.DataSource.CSV", "|DataDirectory|\\data.csv", "data#csv", DataAccessMethod.Sequential), DeploymentItem("data.csv"), TestMethod]


    Public Sub CodedUITestMethod1()
        '           
        ' To generate code for this test, select "Generate Code for Coded UI Test" from the shortcut menu and select one of the menu items.
        '
        Me.UIMap.startgoogle()
        Me.UIMap.clickabtinlucky()
        Me.UIMap.selectlang()
        Me.UIMap.closegoo()

    End Sub

 

     

 

 

 

 


Viewing all articles
Browse latest Browse all 2333

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>