Wednesday, 11 January 2012

Get Assembly Version

Below code would help you get the Assembly version.
This code also stamp the build version in a file where you want to write the build version.
The build version is nothing but versioning provided after building the Project from tfs.
so here the code:
///

/// This method will get the version
///
/// return version of version as string
private static string GetVersion()
{
Assembly assembly = Assembly.GetExecutingAssembly();
FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo(assembly.Location);
return fileVersionInfo.ProductVersion;
}

Thanks,
Md. jawed

Tuesday, 27 December 2011

Basic Interview Questions for Manual Testing By Saravanan on c-sharpcorner


Saravanan the author of above article on c-sharpcorner has nicely collected all the Basic Interview Questions of manual testing.

I would suggest the entire Manual tester to have a look or we should know all this basics of manual testing.

Below is the link of the article published by Saravanan on c-sharpcorner.

Please don’t forget providing your valuable feedback over there.

Thanks,
Md. jawed

.NET Interview Questions complied by Scott Hanselman


While surfing net I came across a fantastic blog. Thought to share with all of you!!
The author of this blog nicely listed out all the Questions being asked in interview or rather Great .net Developers Should know.

So here is the link to get the list of questions from .Net.


Let me know your view about the questions!!
Thanks,
Md. jawed

Tuesday, 20 December 2011

Are you Confuse between Abstract class and interface?

If you are unable to find out, when to use abstract class and interface. Then here is the solution of your problem. I found very useful article on Abstract class and interface. The author “Rahman Mahmoodi” has explained the things in very nice way.


Before going through this article even I was not having clear picture of abstract class and interface.

But now I’m clear about abstract class and interface.

I would suggest all of you to at least once go through this article. And fold back your shelve to learn Abstract class and interface.

Link provided below.

http://www.codeproject.com/KB/cs/abstractsvsinterfaces.aspx

And don’t forget providing your feedback or comments below this article.
Thanks,
Md. Jawed

Friday, 16 December 2011

Dynamically Find controls Type used in web application using WaTin

Introduction:
Using this WaTin feature user would be able to get all the controls types dynamically used in web page.
Details:
  
While performing automation so many times we have faced the issues to find the control type on fly and perform some basic operation or get the properties of controls.


Let me give an example to explain this with clear picture.

Suppose that developer has placed a table on webpage. This table would contents many controls like textbox, button, picture box, label, dropdown, list etc. etc. all this control would appear in table cells dynamically, it means we are not sure when and at what position of cells it will appear in table.

Now we have to read this control on fly and performed some basic operation.

So being an automation engineer, we have programmed our automation code in such a way to know about this control and where it has appeared then performed operation or read properties of that control.

Its bit tricky to handle this kind of situation.

To solve this kind of issues WaTin have provided one best feature to get the type of controls and then based on control we can call our custom method to either get the properties or performed common action.

Here I will only show to how to read controls types on FLY using WaTin.

Below is the Image of web page (to automate this scenario I have developed one basic web application)

And here is the piece of the code to the same.

try

{
IE ie = IE.AttachTo<IE>(Find.ByUrl("http://localhost:28348/Home.aspx"));
var tablecells = ie.Table("table").TableCells;
var type = new string[tablecells.Count];
int i = 0;
    foreach (TableCell tableCell in tablecells)
    {
      try
       {
          string watinType = tableCell.Elements[0].GetType().FullName;
          if (watinType != null) type[i] = watinType.Split('.')[2];
       }
       catch (Exception)
       {
           throw;
        }
    i++;
    }
}
Catch (Exception)
{
throw;
}

And below is the Result when you run the above piece of code. You can see all the controls type in the Type array of string. Shown in below drop down.
Feel free to provide your valuable comments and suggestion.


Thanks,
Md. Jawed