how to write vbscript on web applications in qtp. explian
with one example?
Answer Posted / shyam.meghansh
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 "shyam_sad"
Browser(BRO).Page(PG).WebEdit(PWD).Set "shyam"
Browser(BRO).Page(PG).WebButton(Login).Click
This is for DS.... for VB script u need put this is one
notepad and save it as .vbs file and run it
| Is This Answer Correct ? | 18 Yes | 11 No |
Post New Answer View All Answers
How to make qtp understand the difference amongst the same type of objects .suppose there are 5 check boxes in a page and I have to choose the 2nd one, how to do that through script?
Why bpt?
How does qtp identify the object in the application?
How to use Environment parameterization? Explain with an example.
What is the basic concept of quicktest professional?
Have you used xml check point in your project?
Why do you create a text checkpoint on a Web application? What is the purpose of the Close method?
How many types of actions are there in quicktest professional (qtp)?
Call to copy of an action and call to existing action… i know the diff but in real project how to use..? i want live scenario.pls help me..
how can we do the frame work in qtp
Does QTP have any limitations?Can it work with all kinds of programming languages like java,springs,ajax ,hybernet?Also does it work well with windows 7.What are its other limitations
Did the scripts need lot of maintenance? If yes, why?
What is checkpoints for qtp?
in my application,validation message has in japanise language.how to validate this message is appears properly or not
Is it possible to call from one action to another action in qtp?