Showing posts with label visualtest. Show all posts
Showing posts with label visualtest. Show all posts

Thursday, July 31, 2008

VisualTest - Browser related functions

VisualTest has different set of functions for browser related operations. Below I have given few code snippets.

VistualTest code - To Invoke Internet Explorer

'--------------------------- ' Method : WebStart ' Author : T.Palani Selvam ' Purpose : To Start a IE. ' Parameters: sURL As String. ' ' Returns : - Nil - ' Caller : - Nil ' Calls : - Nil - '----------------------------- Sub WebStart(sURL As String) gsContext = WebExplore(sURL) WSetActWnd(val(gsContext)) If Not wIsMaximized(val(gsContext)) Then wMaxWnd(val(gsContext)) Sleep giPageLoad Logwrite("IE is started. URL : " + sURL , 1) End Sub

Vistual Test code - Navigate to given URL
'------------------------ ' Method : WebNavigation ' Author : T.Palani Selvam ' Purpose : To Start a IE. ' Parameters: sURL As String. ' ' Returns : - Nil - ' Caller : - Nil ' Calls : - Nil - '--------------------------- Sub WebNavigation(sURL As String) If ( Not WebBrowserExists(gsContext)) Then WebStart(sURL) Else WebNavigate(gsContext, sURL) Sleep giPageLoad WSetActWnd(val(gsContext)) If Not wIsMaximized(val(gsContext)) Then wMaxWnd(val(gsContext)) Logwrite("Navigated URL : " + sURL , 1) End If End Sub

Vistual Test code - To click Back Button in Browser
'-------------------------- ' Method : WebBackHistory ' Author : T.Palani Selvam ' Purpose : Back history from IE. ' Parameters: sValue As String. ' ' Returns : - Nil - ' Caller : - Nil ' Calls : - Nil - '----------------------------- Sub WebBackHistory(sValue As String) Dim iTimes As Integer iTimes = Val(sValue) If ( Not WebBrowserExists(gsContext)) Then LogWrite("Main Browser doesn't exist.Couldn't be gone to back", 1) Else If (iTimes = 0) Then iTimes = 1 WebBack(gsContext, iTimes) Sleep giPageLoad WSetActWnd(val(gsContext)) If Not wIsMaximized(val(gsContext)) Then wMaxWnd(val(gsContext)) Logwrite("Going back number of items in History is " + str(iTimes) , 1) End If End Sub

Vistual Test code - To click Forward Button in Browser
'--------------------------- ' Method : WebForwardHistory ' Author : T.Palani Selvam ' Purpose : Forward history from IE. ' Parameters: sValue As String. ' ' Returns : - Nil - ' Caller : - Nil ' Calls : - Nil - '--------------------------------- Sub WebForwardHistory(sValue As String) Dim iTimes As Integer iTimes = Val(sValue) If ( Not WebBrowserExists(gsContext)) Then LogWrite("Main Browser doesn't exist.Couldn't be gone to Forward", 1) Else If (iTimes = 0) Then iTimes = 1 WebForward(gsContext, iTimes) Sleep giPageLoad WSetActWnd(val(gsContext)) If Not wIsMaximized(val(gsContext)) Then wMaxWnd(val(gsContext)) Logwrite("Going Forward number of items in History is " + str(iTimes) , 1) End If End Sub

Tuesday, July 22, 2008

VisualTest - Pressing Shortcut Key

Each GUI testing tool contains a way to press shortcut keys. Visual Test also has the feature to invoke shortcuts. It is similar to SendKeys in Windows Host Script. Below code I have written around eight years ago.

Visual Test code - To invoke Shortcut key



'---------------------
' Method : ShortcutKeys
' Author : T.Palani Selvam
' Purpose : Play shortcut keys.
' Parameters: sDatavalue, String - Contains a file name.
' Returns : Returns Integer data type(True or False.)
' Caller : SwitchSpecialTags
' Calls : - Nil
'----------------------
Function ShortcutKeys(sDataValue As String) As Integer
Dim iPosition As Integer
Dim sFirst As String
Dim sLast As String

ShortcutKeys = False

While (Instr(LCase(sDataValue),"+")<> 0 )
iPosition = Instr(LCase(sDataValue),"+")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 1)
sDataValue = sFirst + sLast
Wend


If (Instr(LCase(sDataValue),"ctrl")<> 0 ) Then
iPosition = Instr(LCase(sDataValue),"ctrl")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 4)
sDataValue = sFirst + "^" + sLast
End IF

If (Instr(LCase(sDataValue),"shift")<> 0 ) Then
iPosition = Instr(LCase(sDataValue),"shift")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 5)
sDataValue = sFirst + "+" + sLast
End IF

If (Instr(LCase(sDataValue),"alt")<> 0 ) Then
iPosition = Instr(LCase(sDataValue),"alt")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 3)
sDataValue = sFirst + "%" + sLast
End IF

If (Instr(LCase(sDataValue),"tab")<> 0 ) Then
iPosition = Instr(LCase(sDataValue),"tab")
sFirst = Left(sDataValue, iPosition - 1)
sLast = Mid$(sDataValue, iPosition + 3)
sDataValue = sFirst + "{TAB}" + sLast
End IF

If (Instr(UCase(sDataValue),"DELETE")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"DELETE")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 6)
sDataValue = sFirst + "{DEL}" + sLast
ElseIf (Instr(UCase(sDataValue),"DEL")<> 0 ) Then
iPosition = Instr(UCase(sDataValue),"DEL")
sFirst = Left(sDataValue, iPosition - 1)
sLast = Mid$(sDataValue, iPosition + 3)
sDataValue = sFirst + "{DEL}" + sLast
End IF


If (Instr(LCase(sDataValue),"enter")<> 0 ) Then
iPosition = Instr(LCase(sDataValue),"enter")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 5)
'sDataValue = sFirst + "{ENTER}" + sLast
sDataValue = sFirst + "~" + sLast
End IF

If (Instr(LCase(sDataValue),"right")<> 0 ) Then
iPosition = Instr(LCase(sDataValue),"right")
sFirst = Left(sDataValue, iPosition - 1)
sLast = Mid$(sDataValue, iPosition + 5)
sDataValue = sFirst + "{RIGHT}" + sLast
End IF

If (Instr(LCase(sDataValue),"left")<> 0 ) Then
iPosition = Instr(LCase(sDataValue),"Left")
sFirst = Left(sDataValue, iPosition - 1)
sLast = Mid$(sDataValue, iPosition + 4)
sDataValue = sFirst + "{LEFT}" + sLast
End IF

If (Instr(LCase(sDataValue),"down")<> 0 ) Then
iPosition = Instr(LCase(sDataValue),"down")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 4)
sDataValue = sFirst + "{DOWN}" + sLast
End IF

If (Instr(LCase(sDataValue),"up")<> 0 ) Then
iPosition = Instr(LCase(sDataValue),"up")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 2)
sDataValue = sFirst + "{UP}" + sLast
End IF

If (Instr(UCase(sDataValue),"ESCAPE")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"ESCAPE")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 6)
sDataValue = sFirst + "{ESC}" + sLast
ElseIf (Instr(UCase(sDataValue),"ESC")<> 0 ) Then
iPosition = Instr(UCase(sDataValue),"ESC")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 3)
sDataValue = sFirst + "{ESC}" + sLast
End IF

If (Instr(UCase(sDataValue),"INSERT")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"INSERT")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 6)
sDataValue = sFirst + "{INS}" + sLast
ElseIf (Instr(UCase(sDataValue),"INS")<> 0 ) Then
iPosition = Instr(UCase(sDataValue),"INS")
sFirst = Left(sDataValue, iPosition - 1)
sLast = Mid$(sDataValue, iPosition + 3)
sDataValue = sFirst + "{INS}" + sLast
End IF

If (Instr(UCase(sDataValue),"BREAK")<> 0 ) Then
iPosition = Instr(UCase(sDataValue),"BREAK")
sFirst = Left(sDataValue, iPosition - 1)
sLast = Mid$(sDataValue, iPosition + 5)
sDataValue = sFirst + "{BREAK}" + sLast
End IF

If (Instr(LCase(sDataValue),"f1")<> 0 ) Then
iPosition = Instr(LCase(sDataValue),"f1")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 2)
sDataValue = sFirst + "{F1}" + sLast
End IF

If (Instr(uCase(sDataValue),"F2")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F2")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 2)
sDataValue = sFirst + "{F2}" + sLast
End IF

If (Instr(uCase(sDataValue),"F3")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F3")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 2)
sDataValue = sFirst + "{F3}" + sLast
End IF

If (Instr(uCase(sDataValue),"F4")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F4")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 2)
sDataValue = sFirst + "{F4}" + sLast
End IF

If (Instr(uCase(sDataValue),"F5")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F5")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 2)
sDataValue = sFirst + "{F5}" + sLast
End IF

If (Instr(uCase(sDataValue),"F6")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F6")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 2)
sDataValue = sFirst + "{F6}" + sLast
End IF

If (Instr(uCase(sDataValue),"F7")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F7")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 2)
sDataValue = sFirst + "{F7}" + sLast
End IF

If (Instr(uCase(sDataValue),"F8")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F8")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 2)
sDataValue = sFirst + "{F8}" + sLast
End IF

If (Instr(uCase(sDataValue),"F9")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F9")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 2)
sDataValue = sFirst + "{F9}" + sLast
End IF

If (Instr(uCase(sDataValue),"F10")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F10")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 3)
sDataValue = sFirst + "{F10}" + sLast
End IF

If (Instr(uCase(sDataValue),"F11")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F11")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 3)
sDataValue = sFirst + "{F11}" + sLast
End IF

If (Instr(uCase(sDataValue),"F12")<> 0 ) Then
iPosition = Instr(uCase(sDataValue),"F12")
sFirst = Left(sDataValue, iPosition -1)
sLast = Mid$(sDataValue, iPosition + 3)
sDataValue = sFirst + "{F12}" + sLast
End IF

Logwrite ("Shortcut key processed: " + sDataValue, 1)

sDataValue = Trim(lCase(sDataValue)) 'Because some times, shortcut keys are not functioned in Upper case.

Play sDataValue

ShortcutKeys = True

End Function

Friday, June 13, 2008

Tool Comparison - Silktest Versus VisualTest

You will not get the difference between Silktest and VisualTest in the web. Thats why I thought to update it. See the comparison below.

Features

SilkTest

VisualTest

OSWindows, UnixWindows
BrowsersInternet Explorer, Netscape, FireFoxOnly Internet Explorer
RecorderMouse Clicks and Context SensitiveOnly Mouse Clicks and Keyboard Events
InstallationSimpleEasy
DebuggingGoodFair
VerificationRecorder and code can be usedNeeds to write lot of code
ResultsResults are stored into *.res files. It can be converted into differnt formatsSuite Manager has the flexibility. Otherwise will output to View Port.
Batch RunSuite (*.s) and Test plan (*.pln) are available.Suite Manager is available.
DLL supportOnly Standard DLLs. It does not support the DLLs, which are created by VBSupporting Standard and COM Dlls
Java SupportSupports all Java componentsSupport for only AWT package
InternatioalizationSupport is availableNo
DocumentationHLP file available. PDF docs are only for beginners.Only HLP file available. Adequate.
Distributed Testing4test scripts can be run in multiple systems from single machine.Not Known
Tool SupportTool support is available for only latest versions (from silktest 8.0 )No
UpdatesContinue process. Latest version is Silktest 2008Product updates were stopped seven years ago (from Version 6.5 )
Cost ~$9000 + Support costLess than $1000
Script TemplatesManualAutomatic Templates
EditorBetter OneGood
Coding 4Test Language. Similar to Visual Basic

Thursday, June 12, 2008

VisualTest - Functions by web Tag

Visual Test has the flexibility to click the web objects by the tag. Even you can verify whether the tag exists or not in the web page. Below I've given code snippets to use tag related functions.

VisualTest code : Click based on the given tag details.

'------------------- ' Method : WebClickTag ' Author : T.Palani Selvam ' Purpose : Click based on the given tag. It is useful to nonform tags. ' Parameters: sContext - String, contains web context value. ' sForm - String, contains part of title. ' sTag - String, contains tag data. ' sTagType - String, type of tag to be processed. ' Returns : Returns Integer, either TRUE or FALSE ' Caller : ' Calls : - Nil - '----------------------- Function WebClickTag (sContext As String, sForm As String, sTagType As String, sTag As String) AS Integer WebClickTag = FALSE If WebTagExists(sContext, sTag, sTagType) Then WebTagClick(sContext, sTag, sTagType) LogWrite("Successfully Clicked tag: " + sTagType, 1) WebClickTag = TRUE Else LogWrite("Failure to Click tag: " + sTagType, 1) End IF End Sub


Visual Test code: Check object exists based on the given tag
'--------------------- ' Method : WebTagCheck ' Author : T.Palani Selvam ' Purpose : Check objectexists based on the given tag. It is useful to nonform tags. ' Parameters: sContext - String, contains web context value. ' sForm - String, contains part of title. ' sTag - String, contains tag data. ' sTagType - String, type of tag to be processed. ' Returns : Returns Integer, either TRUE or FALSE ' Caller : ' Calls : - Nil - '--------------------- Function WebTagCheck (sContext As String, sForm As String, sTagType As String, sTag As String) AS Integer WebTagCheck = FALSE If WebTagExists(sContext, sTag, sTagType) Then LogWrite("Successfully Checked tag: " + sTagType, 1) WebTagCheck = TRUE Else LogWrite("Failure to Click tag: " + sTagType, 1) End IF End Sub

Wednesday, June 11, 2008

VisualTest - Radio button functions

Last week, I interviewed one guy and he is using VisualTest in his company. I'm surprised. IBM - Rational VisualTest development was stopped about seven years ago and Still people are using the tool. Here I have given code snippet for Handling Radio buttons in the browser.

Sample VisualTest Code:



'--------------------------------
' Method : WebClickRadio
' Author : T.Palani Selvam
' Purpose : Selects the Radio Button to the given value.
' Parameters: sContext - String, Contains web context
' sForm - String, contains information about Form
' sRadioButton - String, Contains name of control
' sRadioValue - String, Contains value of control
' Returns : Returns Integer, either TRUE or FALSE
' Caller : WebHandleClick(sContext, sForm, sElement ,sElementValue , sElementType)
' Calls : - Nil -
'-----------------------------
Function WebClickRadio(sContext As String, sForm As String, sRadioButton As String,sRadioValue As String) As Integer
Dim iIndex as Integer, iCount As Integer
Dim sControl As String, sTemp As String
Dim lItem As Long, lState As Long

WebClickRadio = FALSE
If (WebRadioExists(sContext,sForm,sRadioButton)) Then
If (Instr(LCase(sRadioValue),"check") = 1 OR Instr(LCase(sRadioValue),"select") = 1) Then
lState = SELECTED
Else
lState = NOTSELECTED
End IF

If (Instr(sRadioButton,"@") = 0) Then
iCount = WebInputelementCount(sContext, sForm,"radio")
For iIndex= 1 To iCount
lItem = iIndex
sControl = Str$(WebInputElementProperty(sContext,sForm, _ord(lItem), "radio", "name"))
sTemp = Str$(WebInputElementProperty(sContext,sForm, _ord(lItem), "radio", "value"))

Print sControl,sTemp

If ((Instr(Lcase(sRadioButton),lcase(sControl)) <> 0) AND (Lcase(Trim(sRadioValue)) = lcase(sTemp))) Then
WebRadioSetState(sContext, sForm, _ord(lItem), lState)
'WebInputElementSetState(sContext,sForm, _ord(lItem), "radio", SELECTED)
WebClickRadio = TRUE
LogWrite("Successfully set the state for radio button " + sRadioButton, 1)
Exit Function
End IF
Next iIndex
LogWrite("Failure to set the state for radio button " + sRadioButton, 1)
Else
WebRadioSetState(sContext, sForm,sRadioButton, lState)
WebClickRadio = TRUE
LogWrite("Successfully set the state for radio button " + sRadioButton, 1)
End IF
Else
LogWrite("Doesn't exist radio button " + sRadioButton, 1)
End IF
End Function


Sample Visual Test Code: Checks the selected Radio Button to the given value


'---------------------------
' Method : WebRadioCheck
' Author : T.Palani Selvam
' Purpose : Checks the selected Radio Button to the given value.
' Parameters: sContext - String, Contains web context
' sForm - String, contains information about Form
' sRadioButton - String, Contains name of control
' sRadioValue - String, Contains value of control
' Returns : Returns Integer, either TRUE or FALSE
' Caller : WebHandleCheck(sContext, sForm, sElement ,sElementValue , sElementType)
' Calls : - Nil -
'--------------------------
Function WebRadioCheck(sContext As String, sForm As String, sRadioButton As String,sRadioValue As String) As Integer
Dim iValue As Integer, iState AS Integer

WebRadioCheck = FALSE
If (WebRadioExists(sContext,sForm,sRadioButton)) Then
If (Instr(LCase(sRadioValue),"check") = 1 OR Instr(LCase(sRadioValue),"select") = 1) Then
iState = SELECTED
Else
iState = NOTSELECTED
End IF

iValue = WebRadioState(sContext, sForm, sRadioButton)
If (iState = iValue) Then
LogWrite("Successful to check Radio " + sRadioButton,1)
WebRadioCheck = TRUE
Else
LogWrite("Failure to check Radio " + sRadioButton ,1)
End IF
Else
LogWrite("Doesn't exist radio button " + sRadioButton, 1)
End IF

End Function

Thursday, April 17, 2008

Convert Number to Word

In my first job, I needed to have a function to verify the number to string conversion. The number should be converted to the word. For example, if user enters 8908 and function returns the output as Eight Thousand Nine Hundred and Eight only. I thought that it is very simple. After starting to write it, I faced few issues. Thats why I created four functions. I have given the code below. The current code converts up to crores. This code snippet can be used in Visual Test or Visual Basic. Few changes needs to be done to use in VB Script.

Code: Returns the word to the given number



'---------------------------
' Method : NumberToWord
' Author : T.Palani Selvam
' Purpose : Returns the word to the given number.
' Parameters: sGivenNum - String, contains to be converted number.
'
' Returns : Returns String of corresponding number.
' Caller :
' Calls : - Nil -
'----------------------------
Function NumberToWord(sGivenNum As String) As String
Dim lBeforeDecimal As Long, lAfterDecimal As Long
Dim iDecimalPos As Integer, iIndex As Integer
Dim sBeforeDecimalWord As String, sAfterDecimalWord As String
Dim sResult As String, sChar As String

'sResult = Null
sGivenNum = Trim(Str(Val(sGivenNum)))
If Val(sGivenNum) = 0 Then
NumberToWord = "Zero"
Exit Function
End If
sAfterDecimalWord = ""
sBeforeDecimalWord = ""
iDecimalPos = InStr(sGivenNum, ".")
If iDecimalPos = 0 Then
lBeforeDecimal = Val(sGivenNum)
Else
'sGivenNum = Format(sGivenNum, "#####.00")
lBeforeDecimal = Val(Left(sGivenNum, iDecimalPos - 1))
lAfterDecimal = Val(Mid(sGivenNum, iDecimalPos + 1))
If (lAfterDecimal <> 0) Then
'sAfterDecimalWord = " Paise " + PrimaryConversion(lAfterDecimal)
sAfterDecimalWord = " Point" '+ PrimaryConversion(lAfterDecimal)
For iIndex = 1 To Len(trim(str(lAfterDecimal)))
sChar = Mid$(trim(str(lAfterDecimal)), iIndex, 1)
sAfterDecimalWord = sAfterDecimalWord + " " + PrimaryConversion(val(sChar))
Next iIndex
End IF
If (lBeforeDecimal = 0) Then
NumberToWord = sAfterDecimalWord
Exit Function
End IF
End If

sBeforeDecimalWord = SplitType(10000000, " Crore ", lBeforeDecimal)
sBeforeDecimalWord = sBeforeDecimalWord + SplitType(100000, " Lakh ", lBeforeDecimal)
sBeforeDecimalWord = sBeforeDecimalWord + SplitType(1000, " Thousand ", lBeforeDecimal)
sBeforeDecimalWord = sBeforeDecimalWord + SplitType(100, " Hundred ", lBeforeDecimal)
If sBeforeDecimalWord = "" Then
sBeforeDecimalWord = PrimaryConversion(lBeforeDecimal)
Else
sBeforeDecimalWord = sBeforeDecimalWord + "and " + PrimaryConversion(lBeforeDecimal)
End If
sResult = sBeforeDecimalWord

If sAfterDecimalWord = "" Then
sResult = sBeforeDecimalWord
Else
'sResult = sBeforeDecimalWord + " and" + sAfterDecimalWord
sResult = sBeforeDecimalWord + sAfterDecimalWord
End If

NumberToWord = sResult '+ " Only"
End Function


Code: Set the word according to level


'-------------------------
' Method : SplitType
' Author : T.Palani Selvam
' Purpose : Splits a level to next level.
' Parameters: lNumType - Long, contains like 100, 1000
' sWord - String, contains before conversioned word.
' Returns : Returns String of corresponding number.
'----------------------------
Function SplitType(lNumType As Long, sWord As String,lBeforeDecimal As long ) As String
'Dim lBeforeDecimal As Long
Dim lNumberType As Long

SplitType = ""
lNumberType = lBeforeDecimal \ lNumType
If lNumberType > 0 Then
lBeforeDecimal = lBeforeDecimal - lNumberType * lNumType
SplitType = PrimaryConversion(lNumberType) + sWord
End If
End Function


Code: Parse a string to the given condition


'--------------------------
' Method : GetParsedString
' Author : T.Palani Selvam
' Purpose : Parse a string to the given condition
' Parameters: sData - String, contains full string..
' sSeparate - String, contains separation string
' iOccur - String, contains position of the Split
' Returns : Returns String, Null or other values.
'--------------------------
Function GetParsedString(sData As String, sSeparate As String, iOccur As Integer) As String
Dim iPosition As Integer, iIndex As Integer
Dim sTemp As String

GetParsedString = Null
sTemp = sData

For iIndex =1 To (iOccur -1) Step 1
iPosition = Instr(sTemp,sSeparate)
If (iPosition > 0) Then
sTemp=Mid$(sTemp,len(sSeparate) + iPosition)
Else
Print(sSeparate + " is not occured")
Exit Function
End If
' Print "Original Symbol: " + sTemp, sSeparate
Next iIndex
iPosition = Instr(sTemp,sSeparate)
If (iPosition > 0) Then
sTemp=Left$(sTemp,iPosition - 1)
End If
GetParsedString = sTemp
End Function


Code: Converts primary number to word


'----------------------
' Method : PrimaryConversion
' Author : T.Palani Selvam
' Purpose : It converts primary number to string.
' Parameters: lNumber - Long, contains number
'
' Returns : Returns String of corresponding number.
'-------------------------
Function PrimaryConversion(lNumber As Long) As String
PrimaryConversion = ""
Select Case lNumber
Case 0
Case 1
PrimaryConversion = "One"
Case 2
PrimaryConversion = "Two"
Case 3
PrimaryConversion = "Three"
Case 4
PrimaryConversion = "Four"
Case 5
PrimaryConversion = "Five"
Case 6
PrimaryConversion = "Six"
Case 7
PrimaryConversion = "Seven"
Case 8
PrimaryConversion = "Eight"
Case 9
PrimaryConversion = "Nine"
Case 10
PrimaryConversion = "Ten"
Case 11
PrimaryConversion = "Eleven"
Case 12
PrimaryConversion = "Twelve"
Case 13
PrimaryConversion = "Thirteen"
Case 14
PrimaryConversion = "Fourteen"
Case 15
PrimaryConversion = "Fifteen"
Case 16
PrimaryConversion = "Sixteen"
Case 17
PrimaryConversion = "Seventeen"
Case 18
PrimaryConversion = "Eighteen"
Case 19
PrimaryConversion = "Nineteen"
Case 20
PrimaryConversion = "Twenty"
Case 30
PrimaryConversion = "Thirty"
Case 40
PrimaryConversion = "Forty"
Case 50
PrimaryConversion = "Fifty"
Case 60
PrimaryConversion = "Sixty"
Case 70
PrimaryConversion = "Seventy"
Case 80
PrimaryConversion = "Eighty"
Case 90
PrimaryConversion = "Ninety"
Case Else
PrimaryConversion = PrimaryConversion(lNumber - (lNumber Mod 10)) + " " + PrimaryConversion(lNumber Mod 10)
End Select
End Function

Thursday, April 10, 2008

Checking Mail Notification

Earlier I have written the code to verify the mails from Microsoft Outlook Express. I used to call CDO(Collaboration Data Objects) object methods. I developed a small VB application to delete all the objects from Inbox. I think, now few methods are deprecated.

Code:



'It is possible, by calling OLE objects from CDO.dll
'Mostly it will be in C:\Program Files\Common Files\System\Mapi\1033\NT\
'-------------------------
' Method : CheckMail
' Author : T.Palani Selvam
' Purpose : Check the mails in the MS Outlook Mail Client for the particular subject & its status.
' Parameters: sDatavalue, String - Contains Username, Password of the MS outlook, Subject & Status of mail.
' Returns : Returns Integer data type(True or False.)
'----------------------------
Function CheckMail(sDataValue As String) As Integer
Dim objSession As Variant
Dim objInbox As Variant
Dim objMessages As Variant
Dim objItem As Variant
Dim intIndex As Integer
Dim intCount As Integer
Dim varReceived As Variant
Dim iStatus As Integer 'To get Current status of the message.
Dim sSubject As String 'Subject of the current message.
Dim sUser As String, sPword As String, sSearch As String, sStatus As String 'Information gets from the Data value
Dim iPosition As Integer, iPosition1 As Integer
Dim sTemp As String
Dim iResult As Integer

iResult = False 'Initializing function
'Error Information Handling
On Local Error GoTo Error_Handler1

'****** Parsing information from Datavalue
sTemp = sDatavalue
intCount = 1
While (Instr(sTemp,"::") <>0 )
iPosition = Instr(sTemp,"::")

Select Case intCount
Case 1
sUser = Left$ (sTemp, iPosition - 1)
Case 2
sPWord = Left$(sTemp, iPosition - 1)
Case 3
sSearch = Left$(sTemp, iPosition - 1)
'Case 4
'sStatus = Left$(sTemp, iPosition)
sStatus = Mid$ (sTemp, iPosition + 2)
Case Else
LogWrite("CheckMail: More information is given in data file.", 1)
End Select
intCount = intCount + 1
sTemp = Mid$ (sTemp, iPosition + 2)
Wend
'**** End Parsing Information

Logwrite("Search Mail Status: " + sStatus + " & Subject String: " + sSearch, 1)
'Set objSession = CreateObject("MAPI.Session")
objSession = OleCreateObject("MAPI.Session") ' Create MAPI session

'objSession.Logon strUser, strPword, False, False, 0
OleDispatch(objSession,"Logon",sUser, sPword,False, False, 0) ' Logon using an existing MAPI session

'Set objInbox = objSession.Inbox
objInbox=OleDispatch(objSession,"Inbox") ' Get inbox folder

'Set objMessages = objInbox.Messages
objMessages=OleDispatch(objInbox,"Messages") 'Get all messages


intCount=OleGetProperty(objMessages,"Count")

LogWrite("Total Messages in Outlook: " + str(intCount) , 1)

sStatus = Trim (sStatus)

For intIndex=1 To intCount Step 1
objItem=OleDispatch(objMessages,"Item",intIndex) 'Get Each message

sSubject = OleGetProperty(objItem,"Subject")
iStatus = OleGetProperty(objItem,"Unread")


If (InStr(UCase(sSubject), UCase(sSearch)) <> 0) Then
If (iStatus AND (Instr(lCase(sStatus),"read") > 1)) Then
iResult = True
Exit For
ElseIf ((Not iStatus) AND (Instr(lCase(sStatus),"read") = 1)) Then
iResult = True
Exit For
End If

End If
Next intIndex

' Logoff from MAPI Session
OleDispatch(objSession,"Logoff")
'Set objSession = Nothing
OleReleaseObject(objSession)

If (iResult) Then
LogWrite("Successfully Mail is checked in the Outlook.",2)
Else
LogWrite("Failure to check Mail in the Outlook.",1)
'giTestResult = giTestResult + 10
End IF
CheckMail = iResult

Exit Sub

Error_Handler1:

If InStr(UCase(Error$), "LOGON") <> 0 And InStr(UCase(Error$), "FAIL") <> 0 Then
LogWrite("CheckMail : Username and password of Outlook information are incorrect. ", 1)
LogWrite("CheckMail : MS Outlook Login status is Failure.", 1)
End If


If Not (objSession = NULL) Then
OleReleaseObject(objSession)
End If

'PRINT "[Failed At] " ERF "(" ERL ") : " ERROR$ 'Actual location.
'PRINT "[Trapped At] " ERF(1) "(" ERL(1) ")" 'Trapped location.
LogWrite("[Failed At] " + ERF(0)+ "("+ str(ERL) +") : "+ ERROR$,1) 'Actual location.
Logwrite("[Trapped At] "+ ERF(1)+ "("+ str(ERL(1))+ ")",1) 'Trapped location.
LogWrite("Error Handling: Failure to check Mail in the Outlook.",1)

glCellRow = glCellRow + 1
setResultDetails("Error: " + Error$ ,glCellRow,3) 'Write into Excel

End Function

Saturday, April 5, 2008

VisualTest - File Handling

Any automation suite must have file handling functions for various scenarios. It may be just text files or any data files. VisualTest also has few methods for file handling. VisualTest code is similar to Visual Basic code. Below I put some of my visual test functions.

Code: Check the given file exists or not



'----------------------------------
' Method : FileExists
' Author : T.Palani Selvam
' Purpose : Check the given file exists or not. PhaseII
' Parameters: sFile, String - Contains a file name.
' Returns : Returns Integer data type(True or False.)
' Caller : SwitchSpecialTags
' Calls : - Nil
'-----------------------------
Function FileExists(sFile As String)As Integer
Dim iPosition As Integer
Dim sDir As String, sTFile As String, sTemp As String

FileExists = False
sTFile = sFile
iPosition = Instr(sFile,"::")
If (iPosition <> 0) Then
sDir = Mid$(sFile,iPosition + 2)
sTemp = Left(sFile, iPosition - 1)
If (Instr(sTemp,":\") <> 0 ) Then
sTFile = sTemp
Else
If (Right$(Trim(sDir),1) <> "\") Then
sDir = Trim(sDir) + "\"
End If
sTFile = sDir + sTemp
End IF
End If
If Exists(sTFile,"-d") Then
FileExists = True
Logwrite( "Successful - Existing file is " + sTFile , 1)
Else
Logwrite( sTFile + " - File doesn't exist.", 1)
End IF

End Function


Code: Check whether the given folder exists or not


'----------------------------
' Method : FolderExists
' Author : T.Palani Selvam
' Purpose : Check the given folder exists or not.(PhaseII)
' Parameters: sFolder, String - Contains a folder name.
' Returns : Returns Integer data type(True or False.)
' Caller : SwitchSpecialTags
' Calls : - Nil
'---------------------------
Function FolderExists(sFolder As String)As Integer
FolderExists = False
If (Right$(Trim(sFolder),1) = "\") Then
sFolder = Trim(sFolder)
sFolder = Left$(sFolder, Len(sFolder) -1 )
End If

If Exists(sFolder,"+d") Then
FolderExists = True
Logwrite( "Successful - Existing Directory is " + sFolder , 1)
Else
Logwrite( sFolder + " - Directory doesn't exist.", 1)
End IF
End Function


Code: Check whether the given string exists in the given file or not.


'-----------------------------
' Method : StringExists
' Author : T.Palani Selvam
' Purpose : 'Check whether the given string exists in the given file or not.
' Parameters: sFile as String, Contains a file name with full path.
' sWord - String , Consists of string to check into the file.
' Returns : Returns Integer value
' Caller : OperationIdentifier()
' Calls : - Nil
'-------------------------
Function StringExists(sFile As String,sWord As String)As Integer
Dim fNumber As Long
Dim sLine As String
Dim iInt As Integer

fNumber=FREEFILE
StringExists=False

iInt =0

OPEN sFile For Input As #fNumber

While not eof(fNumber)
Line Input #fNumber,sLine
sLine = Trim (sLine)

IF (Instr(sWord,sLine)<>0 AND Len(sLine) > 1) Then
PRINT sLine, "String Exists!"
iInt = iInt + 1
If (iInt > 3) Then
StringExists=True
Exit Function
End IF
End If
Wend

CLOSE #fNumber

End Function

Wednesday, April 2, 2008

VisualTest - Using Excel Application

Our Automation suite results were in text files. I wanted to create the excel file as results file. You can get to know more about Results Reporting. I used Excel VBA for this. It has simplified my task to prepare the compiled results for entire execution.

Similarly I will write, how to do the same thing by using VB script later....

Code: To check Excel availability in the system



'--------------------------------------
' Method : IsExcelAvailable
' Author : T.Palani Selvam
' Purpose : Checks whether excel application is available or not.
' Parameters: - Nil
' Returns : Returns integer, whether true or false.
' Caller :
' Calls :
'--------------------------------
Function IsExcelAvailable() As Integer
Dim objExcelApp As Variant

ON LOCAL ERROR GOTO Errhandler

IsExcelAvailable = False
objExcelApp = OleCreateObject("Excel.Application")
Sleep 0.5
OleReleaseObject(objExcelApp)
IsExcelAvailable = True
Exit Function

ErrHandler:
'LogWrite("[Failed At] " + ERF(0)+ "("+ str(ERL) +") : "+ ERROR$ + " .Error Number: " + str(Err),1) 'Actual location.
'Logwrite("[Trapped At] "+ ERF(1)+ "("+ str(ERL(1))+ ")",1) 'Trapped location.
Logwrite("Excel Application is not available.", 2)
End Function


Code: To Read Excel data


'---------------------------------------
' Method : ReadExcelCells
' Author : T.Palani Selvam
' Purpose : Read the content from given Excel file
' and checks result automatically, while completing a test case.
' Parameters: - Nil -
' Returns : - Nil -
' Caller :
' Calls :
'
'--------------------------------------
Function ReadExcelCells(sExcelFile as String, sWorkBook as String,sWorkSheet as String,sArrFields() As String) As Integer
DIM objExcelApp As Variant,objExcel As Variant, objCurrentCell As Variant
DIM objWorkBook As Variant,objWorkSheet As Variant

Dim iRows As Integer, iCols As Integer
Dim iRowStatus As Integer, iColStatus As Integer
Dim iRowIndex As integer, iColIndex As integer, iIndex As Integer
Dim sCellValue As String, sValue as String

ReadExcelCells = False

objExcel = OleGetObject (sExcelFile)
objExcelApp = OleDispatch (objExcel,"Application")
'objExcelApp = OleCreateObject ("Excel.Application")
objWorkBook = OleDispatch (objExcelApp,"Workbooks", sWorkBook)
'objWorkBook = OleDispatch (objExcelApp,"Workbooks")
'OleDispatch(objWorkBook,"Add",sWorkBook)
objWorkSheet= OleDispatch (objWorkBook,"Sheets", sWorkSheet)

iIndex = 1
Do While Not (iRowStatus)
objCurrentCell= OleDispatch (objWorkSheet, "Cells", iIndex, 1)
sValue = OleGetProperty (objCurrentCell, "Value")
If (Len(Trim(sValue)) = 0 ) Then
iRowStatus = True
End IF
iIndex = iIndex + 1
Loop
iRows = iIndex - 2 'Rows Count
print "No of rows.." + str(iRows)

iIndex = 1
Do While Not (iColStatus)
objCurrentCell= OleDispatch (objWorkSheet, "Cells", 1, iIndex)
sValue = OleGetProperty (objCurrentCell, "Value")
If (Len(Trim(sValue)) = 0 ) Then
iColStatus = True
End IF
iIndex = iIndex + 1
Loop
iCols = iIndex - 2 'Rows Count
print "No of Columns.." + str(iCols)

ReDim sArrFields(iCols - 1,1) As String
For iIndex=1 To iCols
objCurrentCell= OleDispatch (objWorkSheet, "Cells", 1, iIndex)
sValue = OleGetProperty (objCurrentCell, "Value")
sArrFields(iIndex-1, 0) = sValue
Next iIndex


For iRowIndex = 2 To iRows
For iColIndex = 1 To iCols
objCurrentCell= OleDispatch (objWorkSheet, "Cells", iRowIndex, iColIndex)
sValue = OleGetProperty (objCurrentCell, "Value")
sArrFields(iColIndex-1, 1) = sValue
Next iColIndex
For iIndex = LBOUND(sArrFields,1) TO UBOUND(sArrFields,1)
Print "Field (Name,Value): " + sArrFields(iIndex, 0),sArrFields(iIndex, 1)
'Print "Field Value: " + sArrFields(iIndex, 1)
Next iIndex
Next iRowIndex

OleReleaseObject (objWorkSheet)
OleReleaseObject (objWorkBook)
OleReleaseObject (objExcelApp)
OleReleaseObject (objExcel)

ReadExcelCells = True
End Function


Code: To set Test Results by different colors


'-------------------------------------------------------------------------
' Method : setResultXLDetails
' Author : T.Palani Selvam
' Purpose : Set the standard format for the given Cell Object.
' Parameters: sDetails - String, contains information to be written into Excel cell object
' lRow - Long, contains row number
' lCol - long, contains Column number
' iFontType As Integer
' iFontColor As Integer
' Returns : -Nil
' Caller :
' Calls :
'-------------------------------------------------------------------------
'Default values will be given iFontType =0, iFontColor =0
Sub setResultXLDetails(sDetails As String, lRow As Long, lCol As Long,iFontType As Integer, iFontColor As Integer)
Dim objCell As Variant, objFont As Variant

If Not IsNull(gObjWorkBook) Then
objCell = OleDispatch(gObjWorkSheet,"Cells",lRow,lCol)
objFont = OleDispatch(objCell, "Font")
Select Case iFontType
Case 1
OleSetProperty(objFont,"Bold",True)
Case 2
OleSetProperty(objFont,"Italic",True)
Case 3
OleSetProperty(objFont,"Bold",True)
OleSetProperty(objFont,"Italic",True)
Case Else
End Select

Select Case iFontColor
Case Is < 1
Case Is < 26
OleSetProperty(objFont,"ColorIndex",iFontColor)
Case Else
End Select

OleSetProperty(objCell,"Value", sDetails)
OleReleaseObject(objFont)
OleReleaseObject(objCell)
End IF
End Sub


Code: To set value into given cell


'-------------------------------------------------------------------------
' Method : setResultDetails
' Author : T.Palani Selvam
' Purpose : Set the standard format for the given Cell Object.
' Parameters: sDetails - String, contains information to be written into Excel cell object
' lRow - Long, contains row number
' lCol - long, contains Column number
' Returns : -Nil
' Caller :
' Calls :
'-------------------------------------------------------------------------
Sub setResultDetails(sDetails As String, lRow As Long, lCol As Long)
Dim objCell As Variant
If Not IsNull(gObjWorkBook) Then
objCell = OleDispatch(gObjWorkSheet,"Cells",lRow,lCol)
OleSetProperty(objCell,"Value", sDetails)
OleReleaseObject(objCell)
End IF
End Sub

Friday, March 21, 2008

Class Mapping in VisualTest

Already Class Mapping is explained in Custom Objects . Visual test also provides class mapping. VisualTest coding is similar to Visual Basic. But both are not same and used for different purposes. Below code is to treat any given custom class as Button class.

Code snippet:



'--------------------------------------
' Method : WindowsCustomButtonClick
' Author : T.Palani Selvam
' Purpose : Clicks the given Button element.
' Parameters: sButton - String, Contains name of control
' sBtnValue - String, Contains value of control
' sCustomClass - String, contains custom class name.
' Returns : Integer
' Caller : WindowsHandleClick(sContext, sForm, sElement ,sElementValue , sElementType)
' Calls : - Nil -
'-------------------------------------------
Function WindowsCustomButtonClick(sButton As String, sBtnValue As String, sCustomClass As String) As Integer

WButtonSetClass(sCustomClass)
WindowsCustomButtonClick = WindowsButtonClick(sButton, sBtnValue)
wResetClasses()
End Function

'---------------------------------------
' Method : WindowsButtonClick
' Author : T.Palani Selvam
' Purpose : Clicks the given Button element.
' Parameters: sButton - String, Contains name of control
' sBtnValue - String, Contains value of control
' Returns : Integer.
' Caller : WindowsHandleClick(sContext, sForm, sElement ,sElementValue , sElementType)
' Calls : - Nil -
---------------------------------------
Function WindowsButtonClick(sButton As String, sBtnValue As String) As Integer

WindowsButtonClick = False

If (WButtonExists(sButton)) Then
WButtonClick(sButton)
LogWrite("Successfully clicked button " + sButton, 1)
WindowsButtonClick = True
Else
LogWrite("Failure to Click Button " + sButton,1)
End If

End Function

Monday, March 17, 2008

VisualTest Support

VisualTest support has been stopped for around 8 years. But Still few companies are using Visual Test. The two active forums are available for Visual test. One is mt_info Yahoogroups and another one is in SQA Forums. Recently that Yahoo groups also closed.

Visual test cost is very less and many users were there. The last version is 6.5 But still few people are using VT. Thats why I thought to put few visual test code snippets. I am planning to put few posts for visual test.

See the one post from a VT user.
Quote:

After a very extensive search i have found this forum,and i suppose it is still active for Visual Test. Right now i knew that Visual Test is obsolete in the market.But i am pushed to use the tool.As i am very new to testing and currently i do not have the tool as well,I'll be getting it by November 1st week.So could any one help me in starting the preparation.If any of you can guide me where to get the Book Visual Test Bible by Thomas R.Arnold it would be really help full.If any one have the copy same and ready for selling i am ready for purchasing it.So please please help needed.


I hope that this will be applicable to Winrunner in the future.....!!!

Friday, March 14, 2008

VisualTest - MS XML Parser

In my first test automation project, I thought to include XML Parser. At that time, XML concept was new and used in many applications. Visual test supports COM DLL calls. I used Microsoft DOM XML parser. XML is a best choice to have the test data.

XML Development Center
XML FAQ

Below I have given the code snippets to parse the XML files.

Code1: To Parse an XML file.



'-----------------------
' Method : XMLParserLoadXML
' Author : T.Palani Selvam
' Purpose : Creates XML Parsing object according to the given XML formatted String, Element .
' Parameters: sXML - String, contains data in XML Format.
' sTag - String, contains element name from which Tag or element based object to be returned.
' Returns : Returns a variant data, which contains XML Parsing object.
' Caller : - Nil
' Calls : - Nil -
'--------------------------------
Function XMLParserLoadXML(sXML As String, sTag As String) As Variant
Dim objXML As Variant, objNode As Variant, objRoot As Variant, objTemp As Variant
Dim iIndex As Integer, iTemp As Integer

XMLParserLoadXML = NULL
sTag = Trim (sTag)
objXML = OleCreateObject ("Microsoft.XMLDOM") 'Declare a Object
OleSetProperty (objXML,"async","False")
OleDispatch (objXML, "loadXML", sXML) 'Load xmlformat String

'OleSetProperty(objXML,"preserveWhiteSpace") = False

If (OleGetProperty(OleDispatch(objXML, "parseError"), "errorCode") <> 0) Then
LogWrite ("Parsing Error in the String :" + sXML, 1)
Exit Function
End If
'Top Node of given file
objRoot = OleDispatch (objXML,"documentElement")


IF ((sTag = "") OR (sTag = OleGetProperty(objRoot, "nodeName"))) Then
XMLParserLoadXML = objRoot
Exit Function
End IF

If OleDispatch (objRoot ,"hasChildNodes") <> 0 Then
objTemp = OleDispatch (objRoot, "ChildNodes")
iTemp = OleGetProperty(objTemp, "Length")

For iIndex = 0 To iTemp -1
objNode= OleDispatch(objTemp, "item",iIndex)
If (Ucase(trim(OleGetProperty(objNode,"nodeName"))) = UCase(sTag)) Then
XMLParserLoadXML = objNode
Exit Function
Else
OleReleaseObject (objNode)
End If

Next iIndex
End IF

objTemp = OleDispatch(objXML,"getElementsByTagName",sTag) 'For test.xml
iTemp=OleGetProperty(objTemp,"Length")
If (iTemp > 0 ) Then
objNode = OleDispatch (objTemp, "item", 0)
XMLParserLoadXML = objNode
End IF

End Function



Code2: It parses the given tag and returns the content.


'-------------------------------------
' Method : XMLParser
' Author : T.Palani Selvam
' Purpose : Creates XML Parsing object according to the given XML Format File and Element,
' which gives starting or root element of that object.
' Parameters: sXMLFile - String, contains a file name, which is in XML Format.
' sTag - String, contains element name from which Tag or element based object to be returned.
' Returns : Returns a variant data, which contains XML Parsing object.
' Caller : RunTestCase()
' Calls : - Nil -
'------------------------------------
Function XMLParser(sXMLFile As String, sTag As String) As Variant
Dim objXML As Variant, objNode As Variant, objRoot As Variant, objTemp As Variant
Dim iIndex As Integer, iTemp As Integer

XMLParser = NULL
sTag = Trim (sTag)
objXML = OleCreateObject ("Microsoft.XMLDOM") 'Declare a Object
OleSetProperty (objXML,"async","False")
OleDispatch (objXML, "load", sXMLFile) 'Load xmlformat file

'OleSetProperty(objXML,"preserveWhiteSpace") = False

If (OleGetProperty(OleDispatch(objXML, "parseError"), "errorCode") <> 0) Then
LogWrite ("Parsing Error in the File : " + sXMLFile, 1)
Exit Function
End If
'Top Node of given file
objRoot = OleDispatch (objXML,"documentElement")

Print OleGetProperty(objRoot, "nodeName") + " Name of the node.."

IF ((sTag = "") OR (sTag = OleGetProperty(objRoot, "nodeName"))) Then
XMLParser = objRoot
Exit Function
End IF

If OleDispatch (objRoot ,"hasChildNodes") <> 0 Then
objTemp = OleDispatch (objRoot, "ChildNodes")
iTemp = OleGetProperty(objTemp, "Length")

For iIndex = 0 To iTemp -1
objNode= OleDispatch(objTemp, "item",iIndex)
If (Ucase(trim(OleGetProperty(objNode,"nodeName"))) = UCase(sTag)) Then
XMLParser = objNode
Exit Function
Else
OleReleaseObject (objNode)
End If

Next iIndex
End IF

objTemp = OleDispatch(objXML,"getElementsByTagName",sTag) 'For xml Format
iTemp=OleGetProperty(objTemp,"Length")
If (iTemp > 0 ) Then
objNode = OleDispatch (objTemp, "item", 0)
XMLParser = objNode
End IF

End Function

Friday, February 22, 2008

Automation Tool support

In my first job, I used to automate by using VisualTest. There is no updates, after IBM acquired Rational. In this year, the yahoogroups also removed. VisualTest is a simple and powerful tool. Similarly Segue was acquired by Borland. Initially Borland took much time to set the updates on Silktest and Silkperformer. Later it announced that older versions of Silktest and silkperformer will not have support. Now its time for HP-Mercury.

Yesterday I got a mail from my friend. It said that HP is going to stop support for Winrunner. PDF is available here. There is a solution to migrate winrunner scripts to QuickTestProfessional. It is available at win-quick I donot know how much painful task it is for each company.


The frequent acquisitions are making many questions among to automation engineers.

1. Whether this product will be promoted?
2. Whether the updates will be added frequently as per changing technology?
3. What will happen to future if the product is ended?
4. How will be job market for this particular tool?