QTP imp functions
To get getTableData
Function for CountRecords
convNumb
ConvNumbWCents
Function handle unexpected Window on Page
checkStringLength(strBrowser, strPage ,strTable, ReqNum)
Page Wait specify time in intTime parametr
verifyWebElement(strBrowser, strPage, strName, strTag)
Function getRandomNum(RandNum)
dropDowngetValue Get value from dropdown list
For initial sorting function get dataType
Function getRandomNum(RandNum)
clickRadio
GetColumnNumber
ValidateCellData
Function generates random number
Function CompareStrings
Function getLookUp
Select Multiple items from the Web ListTo get getTableData
Function getTableData(strBrowser, strPage, strTableID, strFind, strFindMore)
Dim objBr, objPg, objTbl
Dim intCount, intRow, intCol, blnFound
On Error Resume Next
getTableData = -1
Set objBr = Browser("name:=" & strBrowser)
Set objPg = objBr.Page("title:=" & strPage)
Set objTbl = objPg.WebTable("html id:=" & strTableID, "html tag:=TABLE")
If objTbl.Exist = False Then
Set objTbl = objPg.WebTable("name:=" & strTableID, "html tag:=TABLE")
If objTbl.Exist = False Then
Err.Clear
Exit Function
End If
End If
intCount = objTbl.RowCount
blnFound = False
For intRow = 1 To intCount
For intCol = 1 To objTbl.ColumnCount(intRow)
If InStr(objTbl.GetCellData(intRow, intCol),strFind) > 0 Then
If Len(strFindMore) > 0 Then
For intF = intCol To objTbl.ColumnCount(intRow)
If InStr(objTbl.GetCellData(intRow,intF),strFindMore) > 0 Then
blnFound = True
getTableData = 0
Exit For
End If
Next
Else
blnFound = True
getTableData = 0
End If
End If
If blnFound Then Exit For
Next
If blnFound Then Exit For
Next
If Err.Number <> 0 Then
Err.Clear
End If
End Function
'===========================================
Function for CountRecords
Public Function CountRecords(strBrowser, strPage, strHTML, intExpected, outResult)
On error resume Next
CountRecords = -1
Set objPage = Browser("name:="&strBrowser).Page("title:="&strPage)
objPage.sync
Set objCount = objPage.Object.all.Tags(strHTML)
intActual = objCount.length
If abs(intExpected) = abs(intActual) Then
outResult = "<< PASS >> expected " & intExpected & " , actual result " & intActual & " records."
Err.clear
CountRecords = 0
Exit Function
else
outResult = "<< COMMENT >> expected " & intExpected & ", actual result " & intActual & " records."
Err.clear
CountRecords = 0
Exit Function
End If
'Err.clear
End Function
convNumb
Function convNumbWN(inpNum,outNum)
On Error Resume Next
Dim iSLen, iComma, iComma1,i,j,k
Dim sWork
inpNum=Trim(inpNum)
If InStr(1,inpNum,".") =0 Then
iSLen=Len(inpNum)
iComma = iSLen\3
iComma1 = iSLen/3
outNum=""
If iComma=iComma1 Then
iComma=iComma-1
End If
For i=1 to iComma
j=i*3
sWork=Mid(inpNum,iSLen-j+1,3)
outNum=","&sWork&outNum
Next
k=iSLen-j
sWork=Mid(inpNum,1,k)
If outNum="" and sWork="" Then
outNum="0"
End If
outNum=sWork&outNum
else
outNum=inpNum
end if
On Error Resume Next
convNumb=0
If Err.Number <> 0 Then
convNumb=-1
Err.clear
Else
convNumb= 0
End If
Err.Clear
End Function
ConvNumbWCents
Function ConvNumbWCents(inpNum,outNum)
Dim sWork,sWork2,sWork3
Dim i
i=InStr(1,inpNum,".")
sWork2=Mid(inpNum,1,i-1)
sWork=Mid(inpNum,i,3)
convNumbWN sWork2,sWork3
outNum=sWork3&sWork
End Function
' Function handle unexpected Window on Page
' strBrowser - Name of the Browser
' strPage - Title of the Page
'
''' s = UnexpectedWindow("Cv Portal","CV Portal",strOutput)
public Function UnexpectedWindow(strBrowser,strPage)
On error resume next
Set objPage = Browser("name:="&strBrowser)
objPage.sync
Set unexpectedWin = objPage.Dialog("regexpwndtitle:=Microsoft Internet Explorer")
If unexpectedWin.exist Then
unexpectedWin.WinButton("regexpwndtitle:=OK").Click
UnexpectedWindow = 0
Else
UnexpectedWindow = -1
End If
IF Err.Number > 0 Then
Err.Clear
End IF
End Function
''' ================================================
''' checkStringLength(strBrowser, strPage ,strTable, ReqNum)
''' ================================================
Function checkStringLength(strBrowser, strPage ,strTable, ReqNum)
On error resume next
checkStringLength = -1
Set objPage = Browser("name:="&strBrowser).Page("title:="&strPage)
strCell = objPage.WebTable("html id:="&strTable).GetCellData(4, 5)
If Len(strCell) <= ReqNum Then
checkStringLength = 0
End If
If Err.number > 0 Then
Err.Clear
End If
End Function
''' Page Wait specify time in intTime parametr
''' ================================================
Function pageWait(intTime)
On error resume next
wait (intTime)
If Err.Number <> 0 Then
Err.Clear
End If
pageWait = 0
End Function
'' verifyWebElement(strBrowser, strPage, strName, strTag)
''' ================================================
Function verifyWebElement (strBrowser, strPage, strName, strTag)
On error resume next
verifyWebElement = -1
Set objPage = Browser("name:="&strBrowser).Page("title:="&strPage)
Set objTags = objPage.Object.all.Tags(strTag)
For each Element in objTags
If inStr (Element.innertext, strName) > 0 Then
verifyWebElement = 0
Err.Clear
Exit Function
End If
Next
If Err.number > 0 Then
Err.Clear
End If
End Function
Function getRandomNum(RandNum)
Function getRandomNum(RandNum)
RandNum = RandomNumber (100000000, 999999999)
Err.Clear
getRandomNum = 0
End Function
''' dropDowngetValue Get value from dropdown list
''' ================================================
Function dropDowngetValue (strBrowser, strPage, strName, strValue)
Dim objPage, objPageTags
On error resume next
Set objPage = Browser("name:="&strBrowser).Page("title:="&strPage)
Set objPageTags = objPage.Object.all.Tags("option")
For each Element in objPageTags
If Trim( Element.innertext) = Trim(strValue) Then
If Trim(Element.value) = Trim(strValue) Then
dropDowngetValue = 0
Err.clear
Exit Function
End If
End If
Next
dropDowngetValue = -1
Reporter.ReportEvent 1, "Fail", strValue & "does not exist"
Err.clear
End Function
''' For initial sorting function get dataType
''' =================================================
Function getDatatype(rulesString, delimeter)
Dim arRule
On error resume next
arRule = Split (rulesString, delimeter)
If err.number > 0 Then
getRulesType = -1
err.clear
Exit Function
End If
getDatatype = arRule
End Function
Function getRandomNum(RandNum)
Function closeAllBrowsers()
Dim n
set oDesc = Description.Create()
oDesc("micclass").Value = "Browser"
Set bs = Desktop.ChildObjects(oDesc)
n = bs.count
For i = 0 to n-1
if not bs(i).GetROProperty("title")="Mercury Quality Center" then bs(i).Stop : bs(i).close()
Next
end Function
clickRadio
Function clickRadio(strBrowser, strPage, strValue)
''' c = clickRadio("CreditView Portal", "CreditView Portal", "portlet_creditProd_overviewwlw-radio_button_group_key:{actionForm.creditProductDetailsVO.guaranteesCollateralCodeFlag}")
On error resume next
Dim objPage
Set objPage = Browser("name:="&strBrowser).Page("title:="&strPage)
objPage.sync
Set objPageTagInput = objPage.Object.all.Tags("input")
For each Element in objPageTagInput
If Trim(Element.value) = Trim(strValue) or Trim(Element.id) = Trim(strValue) or Trim(Element.name) = Trim(strValue) Then
Element.click
clickRadio = 0
Err.clear
Exit Function
End If
Next
clickRadio = -1
Err.clear
End Function
GetColumnNumber(
GetColumnNumber
Function GetColumnNumber(strBrowser, strPage, strTableID, strHeader)
Dim objBr, objPg, objTbl
Dim intR, intC, blnFound
On Error Resume Next
GetColumnNumber = -1
Set objBr = Browser("name:=" & strBrowser)
Set objPg = objBr.Page("title:=" & strPage)
blnFound = False
Set objTbl = objPg.WebTable("html id:=" & strTableID, "html tag:=TABLE")
If objTbl.Exist =false Then
Set objTbl = objPg.WebTable("name:=" & strTableID, "html tag:=TABLE")
End If
For intR = 1 To objTbl.RowCount
If Not blnFound Then
For intC = 1 To objTbl.ColumnCount(intR)
If Trim(objTbl.GetCellData(intR, intC)) = strHeader Then
blnFound = True
GetColumnNumber = intC
Exit For
End If
Next
End If
Next
If Err.Number <> 0 Then
Err.Clear
End If
End Function
ValidateCellData
Public Function ValidateCellData(strBrowser, strPage, strTable, strFind, blnSelect, strHeader, strEspected )
On error resume next
Dim objBr, objPg, objTbl, data
ValidateCellData = -1
strRow = GetRowNumber(strBrowser, strPage, strTable, strFind, FALSE )
' msgbox strRow
strCol=GetColumnNumber(strBrowser, strPage, strTable, strHeader)
'msgbox strCol
Set objPg = Browser("name:="& strBrowser).Page("title:="& strPage)
Set objTbl = objPg.WebTable("html id:=" & strTable, "html tag:=TABLE")
strActual = objTbl.ChildItem(strRow, strCol, "WebEdit", 0).GetROProperty("value")
If abs(strActual) = abs(strEspected) Then
ValidateCellData = 0
End If
'objTbl.ChildItem(strRow, strCol, "WebEdit",0).GetROProperty("value").Set(123456)
If Err.Number <> 0 Then
Err.Clear
End If
End Function
' Function generates random number , based on parameters
' intIndex - length of number
' strOutPut - output number
' function returns 0 -success, -1 - failure
'============================================================================================
Function RndNum(intIndex, strOutPut)
On Error Resume Next
Dim intFirst, intLast, intRest, intTimes, strTemp
RndNum = 0
If intIndex < 1 Then
strOutPut = 0
Exit Function
End If
'find reminder
intRest = intIndex Mod 9
' find how many times by 9 needs to be executed
intTimes = intIndex - intRest
If intTimes > 0 Then
intTimes = (intIndex - intRest)/9
End If
If intTimes = 0 Then
intFirst = CLng(1 & String(intIndex-1,"0"))
intLast = CLng(String(intIndex,"9"))
strTemp = RandomNumber(intFirst,intLast)
Else
For i =1 to intTimes
strTemp = strTemp & RandomNumber(100000000,999999999)
Next
If intRest > 0 Then
intFirst = CLng(1 & String(intRest-1,"0"))
intLast = CLng(String(intRest,"9"))
strTemp = strTemp & RandomNumber(intFirst,intLast)
End If
End If
strOutPut = strTemp
If Err.Number <> 0 Then
RndNum = -1
End If
End Function
Function CompareStrings
======================================================================
Public Function CompareStrings(strBrowser, strPage, strTable, strFirst, strSecond, strThird, strOutput)
On error resume next
CompareStrings = -1
Set objPg = Browser("name:="& strBrowser).Page("title:="& strPage)
Set objTbl = objPg.WebTable("name:=" & strTable & ".*")
intRowCount = objTbl.RowCount - 2 ' the last record
'intColCount = objTbl.ColumnCount(intRowCount)
strActual = trim(objTbl.GetCellData(intRowCount,5))
strExpected =trim( "Min"&strFirst&",Inc"&strSecond&",Max"&strThird)
If instr(strActual, strExpected) <> 0 Then
strOutput = "PASS. Pricing option validation pass." & vbCrLf & "Expected result: <" & strExpected & ">" & vbCrLf & "Actual result: < " & strActual & "> are matched"
else
strOutput = "FAIL. Pricing option validation fail" & vbCrLf & "Expected result: <" & strExpected & vbCrLf & "and Actual result:<" & strActual & "> are not matched"
End If
CompareStrings=0
If Err.Number <> 0 Then
Err.Clear
End If
End Function
Function CloseBrowser
'Browser("title:=Popup Select").Close
'end Function
Function closeBrowser()
On Error Resume Next
browser("index:=0").close
if not Err.Number = 0 then
closeBrowser = -1
Err.clear
exit function
end if
closeBrowser = 0
End Function
Function getLookUp
Public Function getLookUp(strBrowser, strPage, strRadioGroup, strSimple, strOutput)
On error resume next
Dim objPage, objTagsString, objTagsRadio, Element,objTagsSpan,arrayElement(),counter
Dim testArrayLinks
Set objPage = Browser("name:="&strBrowser).Page("title:="&strPage)
objPage.sync
' Set objTagsRadio = objPage.Object.all.Tags("input")
Set objTagsSPAN = objPage.Object.all.Tags("SPAN")
If objTagsSPAN.length <> 0 Then
counter = objTagsSPAN.length
ReDim arrayElement(counter)
' ReDim arrayInputs(counter)
For i = 0 to counter - 1
arrayElement(i) = objTagsSPAN.item(i).innertext
' arrayInputs(i) = objTagsRadio.item(i).value
Next
y = 0
For each Element in objTagsSPAN
If instr(Element.innertext, strSimple)<>0 Then
strOutput= Left(Element.innertext,Instr(Element.innertext,"#")-2)
Set r = Element.ParentNode.ParentNode.GetElementsByTagName("input")
If r(0).checked = FALSE Then
' r(0).checked = TRUE
r(0).Click
getLookUp = 0
err.clear
Exit Function
else
Reporter.ReportEvent 1, "Radio Button was not found", strName & "Was not found on the page."
getLookUp = -1
err.clear
Exit Function
End If
End If
y = y+1
Next
End If
End Function
'' Select Multiple items from the Web List.
''' ============================================================
Function selectAllitems(strBrowser, strPage, strListName, strFlag, strName, outPut)
'''' c = selectAllitems(" Portal", " Portal", "portlet_collateral_detailswlw-select_key:{actionForm.selectedPledges}", "One", "Customer 4",outPut)
On error resume next
Dim itemCount
selectAllitems = -1
Set obj = Browser("name:=" & strBrowser).Page("title:=" & strPage)
Set objList = obj.WebList("name:=" & strListName)
itemCount = obj.WebList("name:=" & strListName).GetRoProperty("items count")
If itemCount <= 0 Then
selectAllitems = 0
outPut = "<< ERROR >> No Items found in the List to Select."
Exit Function
else
Select Case strFlag
Case "All"
For i = 0 to itemCount - 1
objList.ExtendSelect ("#" & i )
Next
selectAllitems = 0
outPut = "<< COMMENT >> " & itemCount & " items found and selected in the List."
Case "One"
objList.ExtendSelect (strName)
selectAllitems = 0
outPut = "<< COMMENT >> " & strName & " found and selected in the List."
End Select
End If
If err.number <> 0 Then
outPut = err.description
err.clear
End If
End Function
QTP script
This script is to check checkbox in yahoologin page
Set obj=Description.Create
obj("html tag").value="INPUT"
obj("type").value="checkbox"
set a=Browser("name:=Yahoo! Mail: The best web-based email!").Page("title:=Yahoo! Mail: The best web-based email!").ChildObjects(obj)
a(0).set"ON"
Set a=Description.Create
a("html tag").value="input"
a("type").value="checkbox"
Set b=Browser("name:=").Page("title:=").childobjects(a)
c=b.count
msgbox c
For i=0 to c-1
b(i).set "on"
Next
D.P for checkbox
Script to check whether yahoologinpage(www.yahoomail.com) checkbox is checked or not
Set g=Browser("name:=Yahoo.*").Page("title:=Yahoo.*")
Set obj=Description.Create
obj("htmltag").value="Input"
obj("ClassName").value="webcheckbox"
obj("type").value="checkbox"
Set a=g.childobjects(obj)
c=a(0).getroproperty("checked")
msgbox(c)
If c=0 Then
msgbox "checkbox is not checked"
else
msgbox"checkbox is checked"
End If
Descriptive Programming for Gmail Login Page
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Email").Set "abc"
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Passwd").SetSecure "xyz"
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebButton("name:=Sign in").Click
Browser("name:=Gmail.*").Page("title:=Gmail.*").Frame("name:=v1")
.Link("name:=Sign out").Click
How to run QTP script from command prompt?
How to run QTP script from command prompt?
How to run QTP script from command prompt?
1) Set up the scheduler to invoke or execute the VBS File
2)make sure that you specify path
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTest 'As QuickTest.Test ' Declare a Test object variable
Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible
' Set QuickTest run options
qtApp.Options.Run.CaptureForTestResults = "OnError"
qtApp.Options.Run.RunMode = "Fast"
qtApp.Options.Run.ViewResults = False
qtApp.Open, True ' Open the test in read-only mode
Set qtTest = qtApp.Test
qtTest.Settings.Run.IterationMode = "rngAll" ' Run only iterations 2 to 4
qtTest.Settings.Run.OnError = "NextStep" ' Instruct QuickTest to perform next step when error occurs
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object
qtResultsOpt.ResultsLocation = ' Set the results location
qtTest.Run qtResultsOpt ' Run the test
Descriptive Programming for Yahoo Login Page
SystemUtil.Run"iexplore","http://www.yahoomail.com"
Set g=Browser("name:=Yahoo.*").Page("title:=Yahoo.*")
g.WebEdit("name:=login").Set "aaa"
g.WebEdit("name:=passwd").SetSecure "bbb"
g.WebButton("name:=Sign In").Click
g.Link("name:=Inbox.*",
"html id:=WelcomeInboxFolderLink").Click
g.Link("name:=Sign Out").Click
SystemUtil.Run"iexplore","http://www.yahoomail.com" statement opens yahoo login page
aaa=username
bbb=password
descriptive programming for google search page
SystemUtil.run "iexplore","http://www.google.com"
Browser("name:=Google.*").Page("title:=Google.*").WebEdit
("name:=q").set"Testing"
Browser("name:=Google.*").Page("title:=Google.*").WebButton
("name:=Google Search").Click
Login SIt/UAT environments
Dim Lenvironment
Dim Lurl
Environment.LoadFromFile ("\\wc-a0186-qa-01\users\vmahesh\My Documents\Automation\Startdetails\Set-up.xml")
Lenvironment = Environment.Value("TestEnv")
LUrl = Environment.Value("Url")
Systemutil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE",LUrl
If (Browser("ServiceView PeopleSoft").Page("ServiceView PeopleSoft").WebElement("Channel Secure Enabled"). Check (CheckPoint ("Channel Secure Enabled")) = "True") then
Reporter.ReportEvent micPass,"Service Page Launch", "Service Page launch successfull"
else
Reporter.ReportEvent micFail,"Service Page Launch", "Service Page launch failed. Page did not load"
ExitTest
End If
If (Lenvironment = "SIT") then
If ( Browser("ServiceView PeopleSoft").Page("ServiceView PeopleSoft").Link("Systems Integration Test").Exist(4) = "True" )Then
Reporter.ReportEvent micPass, "Service View page - SIT link", "SIT link in page exists"
Browser("ServiceView PeopleSoft").Page("ServiceView PeopleSoft").Link("Systems Integration Test").click
RunAction "SV Login", oneIteration
else
Reporter.ReportEvent micFail, "Service View page - SIT link", "SIT link in page does not exists"
ExitTest
End If
End If
If (Lenvironment = "UAT") then
If (Browser("ServiceView PeopleSoft").Page("ServiceView PeopleSoft").Link("UserAcceptance Testing").Exist(4) = "True" )Then
Reporter.ReportEvent micPass, "Service View page - UAT link", "UAT link in page exists"
Browser("ServiceView PeopleSoft").Page("ServiceView PeopleSoft").Link("UserAcceptance Testing").Click
RunAction "SV Login", oneIteration
else
Reporter.ReportEvent micFail, "Service View page - UAT link", "UAT link in page does not exists"
ExitTest
End If
End If
Set obj=Description.Create
obj("html tag").value="INPUT"
obj("type").value="checkbox"
set a=Browser("name:=Yahoo! Mail: The best web-based email!").Page("title:=Yahoo! Mail: The best web-based email!").ChildObjects(obj)
a(0).set"ON"
Set a=Description.Create
a("html tag").value="input"
a("type").value="checkbox"
Set b=Browser("name:=").Page("title:=").childobjects(a)
c=b.count
msgbox c
For i=0 to c-1
b(i).set "on"
Next
D.P for checkbox
Script to check whether yahoologinpage(www.yahoomail.com) checkbox is checked or not
Set g=Browser("name:=Yahoo.*").Page("title:=Yahoo.*")
Set obj=Description.Create
obj("htmltag").value="Input"
obj("ClassName").value="webcheckbox"
obj("type").value="checkbox"
Set a=g.childobjects(obj)
c=a(0).getroproperty("checked")
msgbox(c)
If c=0 Then
msgbox "checkbox is not checked"
else
msgbox"checkbox is checked"
End If
Descriptive Programming for Gmail Login Page
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Email").Set "abc"
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebEdit("name:=Passwd").SetSecure "xyz"
Browser("name:=Gmail.*").Page("title:=Gmail.*").WebButton("name:=Sign in").Click
Browser("name:=Gmail.*").Page("title:=Gmail.*").Frame("name:=v1")
.Link("name:=Sign out").Click
How to run QTP script from command prompt?
How to run QTP script from command prompt?
How to run QTP script from command prompt?
1) Set up the scheduler to invoke or execute the VBS File
2)make sure that you specify path
Dim qtApp 'As QuickTest.Application ' Declare the Application object variable
Dim qtTest 'As QuickTest.Test ' Declare a Test object variable
Dim qtResultsOpt 'As QuickTest.RunResultsOptions ' Declare a Run Results Options object variable
Set qtApp = CreateObject("QuickTest.Application") ' Create the Application object
qtApp.Launch ' Start QuickTest
qtApp.Visible = True ' Make the QuickTest application visible
' Set QuickTest run options
qtApp.Options.Run.CaptureForTestResults = "OnError"
qtApp.Options.Run.RunMode = "Fast"
qtApp.Options.Run.ViewResults = False
qtApp.Open
Set qtTest = qtApp.Test
qtTest.Settings.Run.IterationMode = "rngAll" ' Run only iterations 2 to 4
qtTest.Settings.Run.OnError = "NextStep" ' Instruct QuickTest to perform next step when error occurs
Set qtResultsOpt = CreateObject("QuickTest.RunResultsOptions") ' Create the Run Results Options object
qtResultsOpt.ResultsLocation =
qtTest.Run qtResultsOpt ' Run the test
Descriptive Programming for Yahoo Login Page
SystemUtil.Run"iexplore","http://www.yahoomail.com"
Set g=Browser("name:=Yahoo.*").Page("title:=Yahoo.*")
g.WebEdit("name:=login").Set "aaa"
g.WebEdit("name:=passwd").SetSecure "bbb"
g.WebButton("name:=Sign In").Click
g.Link("name:=Inbox.*",
"html id:=WelcomeInboxFolderLink").Click
g.Link("name:=Sign Out").Click
SystemUtil.Run"iexplore","http://www.yahoomail.com" statement opens yahoo login page
aaa=username
bbb=password
descriptive programming for google search page
SystemUtil.run "iexplore","http://www.google.com"
Browser("name:=Google.*").Page("title:=Google.*").WebEdit
("name:=q").set"Testing"
Browser("name:=Google.*").Page("title:=Google.*").WebButton
("name:=Google Search").Click
Login SIt/UAT environments
Dim Lenvironment
Dim Lurl
Environment.LoadFromFile ("\\wc-a0186-qa-01\users\vmahesh\My Documents\Automation\Startdetails\Set-up.xml")
Lenvironment = Environment.Value("TestEnv")
LUrl = Environment.Value("Url")
Systemutil.Run "C:\Program Files\Internet Explorer\IEXPLORE.EXE",LUrl
If (Browser("ServiceView PeopleSoft").Page("ServiceView PeopleSoft").WebElement("Channel Secure Enabled"). Check (CheckPoint ("Channel Secure Enabled")) = "True") then
Reporter.ReportEvent micPass,"Service Page Launch", "Service Page launch successfull"
else
Reporter.ReportEvent micFail,"Service Page Launch", "Service Page launch failed. Page did not load"
ExitTest
End If
If (Lenvironment = "SIT") then
If ( Browser("ServiceView PeopleSoft").Page("ServiceView PeopleSoft").Link("Systems Integration Test").Exist(4) = "True" )Then
Reporter.ReportEvent micPass, "Service View page - SIT link", "SIT link in page exists"
Browser("ServiceView PeopleSoft").Page("ServiceView PeopleSoft").Link("Systems Integration Test").click
RunAction "SV Login", oneIteration
else
Reporter.ReportEvent micFail, "Service View page - SIT link", "SIT link in page does not exists"
ExitTest
End If
End If
If (Lenvironment = "UAT") then
If (Browser("ServiceView PeopleSoft").Page("ServiceView PeopleSoft").Link("UserAcceptance Testing").Exist(4) = "True" )Then
Reporter.ReportEvent micPass, "Service View page - UAT link", "UAT link in page exists"
Browser("ServiceView PeopleSoft").Page("ServiceView PeopleSoft").Link("UserAcceptance Testing").Click
RunAction "SV Login", oneIteration
else
Reporter.ReportEvent micFail, "Service View page - UAT link", "UAT link in page does not exists"
ExitTest
End If
End If
Useful links for QTP
http://www.twango.com/media/ankurj.public/ankurj.10003
QTP tutorial
http://www.kabinfo.net/kabinterviews/
Testing info
http://www.chetanasforum.com/lofiversion/index.php/f27.html
chetanasforum
www.softwaretestinghelp.com/preparation-of-qtp-interview-questions/
Learning basics of QTP automation
http://www.ameerpet.in/Messages.aspx?forumid=947&topicid=40&ftype=1
Testing Interview Qns
http://softwareqatestings.com/content/view/70/97/
softwareqatestings
http://www.bugtest.info/quick-test-professional-questions-answers-part-2/
quick-test-professional-questions-answers
http://mercuryquicktestprofessional.blogspot.com/2007/10/vb-script-and-qtp-part1.html
Good site for test automation
http://www.software-automation.org/forum/search.php?search_author=jerome
software-automation
www.software-automation.org/forum/viewtopic.php?t=382&view=next
automation forum
http://www.software-automation.org/forum/index.php
software-automation
http://www.advancedqtp.com/knowladge-base/scripting-quicktest-professional/
advancedqtp
http://www.knowledgeinbox.com/documents/closingprocesses.html
knowledgeinbox
http://www.techinterviews.in/all-interview-questions/3
techinterviews
http://geocities.com/xtremetesting/
xtremetesting
http://www.ittestpapers.com/interviewquestions/testing15.htm
ittestpapers
http://software-testing-askme.blogspot.com/2007/05/software-testing-resources-speedlinking.html
Testing info
http://testingsoftware.blogspot.com/2005/07/all-posts.html
knowledge about software testing
http://software-testing-zone.blogspot.com/2007/05/software-testing-for-freshers-tested.html
For freshers,,how to get started.
http://www.softwareqatest.com/
QA and Testing Resource Center
http://www.qaforums.com
qaforums
http://my330space.wordpress.com/2006/05/18/interview-question-of-qtp/
Interview questions of QTP
http://www.openqa.org/selenium/
Selenium
QTP tutorial
http://www.kabinfo.net/kabinterviews/
Testing info
http://www.chetanasforum.com/lofiversion/index.php/f27.html
chetanasforum
www.softwaretestinghelp.com/preparation-of-qtp-interview-questions/
Learning basics of QTP automation
http://www.ameerpet.in/Messages.aspx?forumid=947&topicid=40&ftype=1
Testing Interview Qns
http://softwareqatestings.com/content/view/70/97/
softwareqatestings
http://www.bugtest.info/quick-test-professional-questions-answers-part-2/
quick-test-professional-questions-answers
http://mercuryquicktestprofessional.blogspot.com/2007/10/vb-script-and-qtp-part1.html
Good site for test automation
http://www.software-automation.org/forum/search.php?search_author=jerome
software-automation
www.software-automation.org/forum/viewtopic.php?t=382&view=next
automation forum
http://www.software-automation.org/forum/index.php
software-automation
http://www.advancedqtp.com/knowladge-base/scripting-quicktest-professional/
advancedqtp
http://www.knowledgeinbox.com/documents/closingprocesses.html
knowledgeinbox
http://www.techinterviews.in/all-interview-questions/3
techinterviews
http://geocities.com/xtremetesting/
xtremetesting
http://www.ittestpapers.com/interviewquestions/testing15.htm
ittestpapers
http://software-testing-askme.blogspot.com/2007/05/software-testing-resources-speedlinking.html
Testing info
http://testingsoftware.blogspot.com/2005/07/all-posts.html
knowledge about software testing
http://software-testing-zone.blogspot.com/2007/05/software-testing-for-freshers-tested.html
For freshers,,how to get started.
http://www.softwareqatest.com/
QA and Testing Resource Center
http://www.qaforums.com
qaforums
http://my330space.wordpress.com/2006/05/18/interview-question-of-qtp/
Interview questions of QTP
http://www.openqa.org/selenium/
Selenium
Subscribe to:
Posts (Atom)