Friday, 25 November 2011

White: An UI Automation tool for windows application

White: An UI Automation tool for windows application


Finaly i wrote an article on White. just now published this article on code project.
below is the link for the same.
Please have a look and provide your feedback.
 
http://www.codeproject.com/KB/testing/WhiteCalculatorTest_cs.aspx
 
 
 
Thanks,
Md. jawed
 
 

Thursday, 17 November 2011

Adding a Code Snippet into Visual Studio2010 to enclose a block of code.

While surfing web I came across a nice blog post by PRABATH .


Who has nicely explained about adding the code snippet in visual studio 2010 to enclose the block of code?. The best part about this post is that he tried best to explain all the steps through screen shot which make the blog post more clear and easy to understand.




Thanks to Prabath for this nice work.

Follow the below link to get the details.

http://prabathf.blogspot.com/2010/02/code-snippets-in-visual-studio-2010.html
 
Keep up the good job buddy :)
 
Thanks,
Md. jawed

Tuesday, 15 November 2011

Get the Table Header names using watin

The following code will get Table header names.


TableRow tableRow = Browser.Table("headerTable").TableRow("headerRow");
StringCollection headerValues = new StringCollection();

foreach (Element e in tableRow.Elements)
 {
    if (e.TagName.ToUpper()=="TH")
    {
        headerValues.Add(e.Text);
     }
 }

Thanks,
Md. Jawed

Tuesday, 25 October 2011

Tools To Validate Output\Get all dependencies objects From Store Procedure.


                                **********TALK 2 DB**************
I have developed an application/tool to get the output from a store procedure after connecting to the source and target storprocedure on a specific server.


Just you need to pass inputs parameter on UI and this will show all the output values generated by selected store procedure. Even you will get flexibility to get all the dependencies object names on particular selected store procedure name. These entire interfaces on UI itself.

Still i am working to come with full article or details.

Soon I will share an article with all of you.

To just give a glimpse of the application, i have added few snaps shot of tool.

"Talk2DB" that’s the name of this tool.
1. Main Window:

Main Window
  2. Connecting to DataBase
Connecting to DataBase
 3. Getting all the dependecies from Sp.
Getting all the dependecies from Sp.
4. Showing Out Put from Store procedure
Showing Out Put from Store procedure
Thank you,
Md. jawed

Tuesday, 4 October 2011

Get List of open windows in a machine including pop up windows

class Program
{
{
foreach (KeyValuePair<IntPtr, string>lWindow in OpenWindowGetter.GetOpenWindows())

IntPtr lHandle = lWindow.Key;
string lTitle = lWindow.Value;
Console.WriteLine("{0}: {1}", lHandle, lTitle);}}
}

================
using System;

using System.Collections.Generic;
using System.Linq;
using System.Runtime.InteropServices;
using System.Text;
namespace GetOpenWindows
{
using HWND = IntPtr;/// Contains a method to get all the open windows.
public static class OpenWindowGetter{/// Returns a dictionary that contains the handle and title of all the open windows./// A dictionary that contains the handle and title of all the open windows.
 {
    EnumWindows(delegate(HWND hWnd, int lParam)
     {
        if (hWnd == lShellWindow) return true;



        if (!IsWindowVisible(hWnd)) return true;
        int processId;
        processId= GetWindowThreadProcessId(hWnd,out processId);
        int lLength = GetWindowTextLength(hWnd);
        if (lLength == 0) return true;
        StringBuilder lBuilder = new StringBuilder(lLength);
        GetWindowText(hWnd, lBuilder, lLength + 1);
        lWindows[hWnd] = lBuilder.ToString();
         return true;
      }, 0);
   return lWindows;
 }

delegate bool EnumWindowsProc(HWND hWnd, int lParam);

[DllImport("USER32.DLL")]
static extern bool EnumWindows(EnumWindowsProc enumFunc, int lParam);

[DllImport("USER32.DLL")]
static extern int GetWindowText(HWND hWnd, StringBuilder lpString, int nMaxCount);

[DllImport("USER32.DLL")]
static extern int GetWindowTextLength(HWND hWnd);

[DllImport("USER32.DLL")]
static extern int GetWindowThreadProcessId(HWND hWnd, out int processId);

[DllImport("USER32.DLL")]
static extern bool IsWindowVisible(HWND hWnd);

[DllImport("USER32.DLL")]
static extern IntPtr GetShellWindow();

 }
}

Thanks,
Md. Jawed