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
How to recognise the webelement and verifying that webelement is enabled?
What is the difference between keyword view and expert view?
Why qtp the best testing tool?
Hi frnds, does anybody know if there is anything called "thin point" or something in qtp? thanks in advance.
Tell me about qtp?
Connect to QC using AOM.
What is the extension of the recovery scenario file in qtp?
can test automation improve test effectiveness?
Define Error Pane of UFT?
How you can find length of array in qtp?
In an interview, what r the general questions asked in QTP? pls give me anwser to this question?
What is fragmentation and paging?
Hi All, issue is related to handling pop up script generated in IE, and run on mozilla. In App Under Test, when we get the alert pop ups, we just click ok button. if we need to run the same code on mozilla it will not identify . so we will check browser if browser(*).dialog(IE object).exits browser(*).dialog(IE object).winbutton(OK).click else 'by default mozilla browser(*).dialog(mozilla object).page(*).webbutton(OK).CLICK END IF But my qustion is. Do we write the above piece of code where ever we get such kind of pop ups from the application like alert pop up, confirmation pop up.... OR do we have any other alternative way to do this by using any functions in Recovery Scebarios? If Any of u know idea please do help me in this regard. or send answer to kravimb@gmail.com
Hi.. I want to do parametrization for selecting perticular flighr say XYZ by using local table: criteria: 1.If flight is available msgbox "Flight is available" and then select flight from flight table and click to ok button after that as enter username and ticket no and then stop 2. otherwise msgbox " Flight is not available" and stop Please help me out ..and let me know your responses on dipak.bachhav@gmail.com Regard, Dipak
Which features or drawbacks of QTP lead to the upgrade for a newer version?