Sunday, 15 February 2015

C#(Help Links) - Miscellaneous

C# - Miscellaneous

2. TeamCity for .NET Developers - 2 - Setup

3. Troubleshooting - Exception 'microsoft.ace.oledb.12.0' provider is not registered on the local machine. in c#
- Try to download and install "2007 Office System Driver: Data Connectivity Components" this may solve the exception. 

4.Facing problem while opening Visual Studio solution, while opening .cs file or while trying to run it. Error message "No exports were found that match the constraint contract name"
Just rename or delete the Microsoft.VisualStudio.Default.cache file inside the above location.

5. Visual J# 

6. C# Fundamentals for Absolute Beginners 

7. C# calling the method in the class using reflection api.

Below sample program using reflection api is copied from above url
using System.Reflection;
public class TestMethodInfo
    public static void Main()
        // Get the constructor and create an instance of MagicClass

        Type magicType = Type.GetType("MagicClass");
        ConstructorInfo magicConstructor = magicType.GetConstructor(Type.EmptyTypes);
        object magicClassObject = magicConstructor.Invoke(new object[]{});

        // Get the ItsMagic method and invoke with a parameter value of 100

        MethodInfo magicMethod = magicType.GetMethod("ItsMagic");
        object magicValue = magicMethod.Invoke(magicClassObject, new object[]{100});

        Console.WriteLine("MethodInfo.Invoke() Example\n");
        Console.WriteLine("MagicClass.ItsMagic() returned: {0}", magicValue);
8. Java and AutoIT
9. Convert JSON Data Into Html Table Using Javascript JQuery


C# Help Links - Nunit

    C# Nunit Help Links

1. NUnit Test Application  download(based on NUnit console runner)

2. Install or set up Nunit framework in Visual Studio

3. Install or set up Selenium WebDriver with C# sharp and Nunit in Visual Studio

4. Debugging NUnit Tests in Visual Studio 2010

5. Test Automation using C#, Selenium WebDriver and NUnit

6. How do I create and run NUnit/WebDriver test-suites.

7. Running NUnit tests programmatically

8. Nunit Suite builder

9. Run a test suite with NUnit GUI

10.Setup Jenkins on Windows and integrating it with NAnt.

11. NAnt Home Page.

12. Xamarin Studio

Wednesday, 11 February 2015

C# - 'Hello World' Console Application program.

Click link for Visual C# installation procedure 

Launch Visual C# IDE.

Select 'New Project'.

Select 'Console Application' and click on 'OK' button.

Type 'Cons' and click keyboard 'Contrl' + 'Space' (Cntrl+Space) to see the available classes.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ConsoleApplication1
    public class Program
        static void Main(string[] args)
            Console.WriteLine("Hello World");

Executing the Program:

Output is displayed in console after executing the program.

Additional Information:
ConsoleApplication1.exe is generated.

Double click on 'ConsoleApplication1.exe' to execute exe file.
Executing .exe file doesn't require Visual C# IDE to be launched.

Microsoft Visual C# 2010 Express edition installation

Download Visual C# 2010 Express edition from below url

Click "Visual C# 2010 Express".

Select the <<language>> and click on 'install now' link.

Download your selection(i.e. Visual C# 2010 Express)

Click on 'Save File' to download the vcs_web.exe installation file.

Installation file(i.e. vcs_web.exe) is downloaded into downloads folder.

Click on 'vcs_web.exe' to install Visual C# 2010 Express

Click on 'Next' button.

Accept the license terms and click on 'Next' button.

Click on 'Next' button.

Click on 'Install >' button.

Click on 'Exit' button.

Click on 'Restart Now' to restart the system.

After system restarts, open the Visual C# 2010 Express
Below screenshot show opening 'Visual C#' in 'Window 8 Operating System'.

Microsoft Visual C# 2010 Express is launching.

Thursday, 5 February 2015


Using Selenium-VBA automation developer can develop the selenium script using VBA code in Excel.
Once the user actions are recorded with Selenium-IDE, they can be converted(i.e. formated) in to a VBA script and placed in the Excel and executed.

Below are the steps to be performed.
i.  Installing 'SeleniumWrapperSetup-<<version>>.exe'.
ii. Installing the Selenium-VBA addon in Selenium IDE.
iii. Selecting 'SeleniumWrapper Type Library' reference.
iv. Recording the user interactions in Selenium IDE.
v. Converting the recorded user interactions in to Selenium-VBA script.
vi. Writing the Selenium-VBA code in Excel.
vii. Executing the Selenium-VBA script.

1. Microsoft office is installed on Windows OS.
2. Firefox browser is installed.
3. Selenium-IDE is installed in Firefox browser.
4. Chrome browser is installed, if the scripts need to be executed on chrome browser.

1. Open the "Microsoft Office Excel Worksheet".

2. Create the Macro.

 3. Open References.

4. Verify 'SeleniumWrapper Type Library' is displayed in references.

5. if  'SeleniumWrapper Type Library' is not displayed in references, then search for 'Selenium vba wrapper download'.

6. Download the 'SeleniumWrapperSetup-<<version>>.exe' file.

7. Install the 'SeleniumWrapperSetup'.
Click 'Run' button.
 Click 'Next' button.
 Accept the agreement.
 Click 'Next' button.

Click 'Install' button.

 Don't uncheck the check box and click on 'Finish' button.
 Click 'Install Now' button to install Selenium-VBA addon in Selenium IDE.
Click 'Restart' button.
Verify Selenium-VBA is installed in Firefox browser extensions.

8. Perform create/open macro in excel.
Now verify 'SeleniumWrapper Type Library' is displayed is displayed in  "Tools" --> "References" in Excel.

9. Record the user interactions using Selenium IDE.
Open Selenium IDE

perform some actions, user actions are recorded in selenium ide.

10. Convert the script to VBA.
Select 'Options' --> 'Format' --> 'VBA/Webdriver'.

11. Copy the Selenium VBA recorded script.

12. Paste the copied script in Sub.

13. Change the browser name to 'chrome'.

14. Execute the script.

Note: Before executing the script make sure 'SeleniumWrapper Type Library' is selected in "Tools" --> "References". 


Environment used for executing the above Selenium-VBA script:
OS: Windows 7
Browser: Chrome 39
Microsoft Office 2007