take one example and write vbscript on one web application
in qtp?
explian descriptive programe with one example?
Answer Posted / shyam.meghansh
Example for VB Script
Function fib(n)
Dim fab(70)
fab(0)=0
fab(1)=1
For j=2 to n
fab(j)=fab(j-1)+ fab(j-2)
Next
For i=0 to n-1
msgbox fab(i)
Next
end function
Next Save this function in .vbs file and call the function
in QTP Action
Example for Descriptive Programme
systemutil.Run("http://www.rediffmail.com")
set BRO =Description.Create()
BRO("title").Value = "Welcome to Rediff.com India"
BRO("name").value ="Welcome to Rediff.com India"
BRO("openedbytestingtool").value= true
Set PG =Description.Create()
PG("title").value="Welcome to Rediff.com India"
PG("url").value="http://www.rediff.com/index.html"
Set UN =Description.Create()
UN("name").value= "login"
UN("Class Name").value ="WebEdit"
UN("type").value= "text"
UN("html tag").value="INPUT"
Set PWD =Description.Create()
PWD("name").value ="passwd"
PWD("Class Name").value="WebEdit"
PWD("type").value="password"
PWD("html tag").value="INPUT"
Set Login =Description.Create()
Login("name").value ="Go"
Login("Class Name").value="WebButton"
Login("type").value="submit"
Login("html tag").value="INPUT"
Login("value").value="GO"
Login("class").value="rmailgobtn"
temp= Browser("Welcome to Rediff.com").Page("Welcome to
Rediff.com").WebElement("ShockwaveFlash1").Exist
If temp= true Then
'Browser("Welcome to Rediff.com").Page("Welcome to
Rediff.com").WebElement("ShockwaveFlash1").
End If
Browser(BRO).Page(PG).WebEdit(UN).Set "testingwithshyam"
Browser(BRO).Page(PG).WebEdit(PWD).Set "shyamshyam"
Browser(BRO).Page(PG).WebButton(Login).Click
..................... Any More Querys mail to
testingwithshyam@gmail.com
| Is This Answer Correct ? | 2 Yes | 1 No |
Post New Answer View All Answers
When using descriptive programming?
wht type of User defined functions or Java Releated functions do we write in VB scripting
What is the new version of qtp which is recently released in the market?
If I change the object name in one action will it be updated in all the actions? Or not?
Consider one application is open, clicking one menu will open another application in another browser. QTP does not catch the URL of the second browser(second application). can we capture it ?
What are the benefits of quick test pro(qtp)?
wt is the use of multiple questions in QTP
i need qtp tutorial. pls send it to sridhar.k151@g mail.com
How to handle the exceptions using recovery secnario manager in quicktest professional (qtp)?
Tell some commonly used Excel VBA functions?
Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly
what is output value in QTP and how it can be used in automation testing
What are advantages of test automation?
What is the use of ordinal identifier in qtp?
Can any one tell me how to write a script for selecting open option in File menu of A word document.here you have to add objects to OR.try like that and give me the ans.i asked this question to so many but no one knows.if any one know the answer plz let me know