Hi,
I already have a data connector defined in my solution via GUI. However for my code development I need to get the file name with which the data connector was created. I did have a look at the data connector class , filedataconnector class etc. and they do give a filename method, but they donot give a method which can reference an existing data connector. from where I can get the filename. Any help would be beneficial.
regards
Harendra
Dataconnector binding
- Support Team
- Site Admin
- Posts: 12145
- Joined: Fri Jul 07, 2006 4:30 pm
- Location: Houston, Texas, USA
- Contact:
Re: Dataconnector binding
Hi,
There are different ways how you can access the data connectors in code, here are two of them:
Regards,
Markus
Ranorex Support Team
There are different ways how you can access the data connectors in code, here are two of them:
Report.Info("Name of Connector: "+DataSources.All[0].Connector.Name); Report.Info("Name of Connector: "+DataSources.Get("The Name of the Connector").Connector.Name);You can also create your connectors in code: Test data from .csv.
Regards,
Markus
Ranorex Support Team
Re: Dataconnector binding
Markus,
Thank you very much for your help. Actually I wanted to get the file path of the already defined data connector. This helped me to actually get the connector itself and then I type-casted and achieved what I wanted.
Harendra
Thank you very much for your help. Actually I wanted to get the file path of the already defined data connector. This helped me to actually get the connector itself and then I type-casted and achieved what I wanted.
Harendra