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
What will be happen if i load object repository at run time, but it has already associated.
How do you configure QTP AND Test director?
wt is the use of multiple questions in QTP
What are the types of data tables in qtp?
How to Open FireFox using descriptive programing? If my question is not clear, i will give an Example To Open Internet Explorer, We use Set IE = CreateObject(InternetExplorer.Application) IE.Navigate "www.yahoo.com In the same i need to open yahoo.com in firefox. Can any one tell me what is the server name of firefox to create an object
Explain step generator in qtp?
How to check bitmap output value?
Can any one tell me about "Mapping Repository Parameter Values" and why we use it....??How to use it???Please, tell the preconditions also...........???? Thanks in Advance
How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What's the difference between them? How to handle script issues?
In the website, the protocol has been changed http: to https what you will do? Tell me your approach?
Why bpt?
Hi All, I Want To excute scripts batch without using QC .I need code for that Thanks Balaji
If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?
if there is a web table of having row and colmns.a button is placed at 2nd row's 3rd column which is worked for both edit and delete..how to write script for the button to test both operation on the web table using desriptive programing.. plz help me on script wheather using getroproperty Q2)what is the command for taking valiue from a web table in qtp
Which is the best QTP training institute in Delhi/NCR region and what is the approximate fee for QTP course (Basics and Advanced)