| || |
QA Autmation Scripting Login help
I am trying to create a automation script for a site. I am having trouble in getting how can I script to get data from excel which contains URL, username and password. I have added an example of how I have stored my data in Excel. If anyone have a video tutorial or steps to understand it please do share.
Appreciate your help.
Platform: Visual Studio 2013 (Selenium Webdriver)
Looks like what you're trying to do is a simple config file.
In the .Net world, we tend to use App.config for that stuff. http://www.dotnetperls.com/appsettings
Although the syntax is ugly, what you get is App config transforms so you can apply transforms to the settings according to your build target. This is very useful for changing your settings depending on which environment you want to run on without writing extra configuration code.
Anyways, you can use this to open excel workbooks, https://msdn.microsoft.com/en-us/library/b3k79a5x.aspx
Yes it is advisible to use a cfg or properties for these kind of data.
Have seen this to read excel with C# - .net - Reading Excel files from C# - Stack Overflow