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 many add-ins comes by default with quicktest professional (qtp)?
Who uses qtp tool?
before launching qtp, we need to close all the open browsers u dont know what are all the browsers either it might be ie,mozilla etc and u dont know how many brosers are open.... u need to close all these before launching qtp.. can anyone plz temme d solution...
How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?
What is difference between run time object and test object?
How can i initiate the objects to find uniquely in OR
How many ways we can parameterize data in quicktest professional?
hi i have 4 yrs exp in manual and automation testing using QTP i need sample resumes plz can u send this mail id pbre1980@gmail.com
For QTP Test Engineer, What is his contribution to the Project? Means, As as automation test engineer what is his role in the current project?
Generic function to search for the unique link in webtable and click on it
hi in real time who will execute the qtp test scripts? my faculty said, in a companty automation testers are written the test scripts and manual testers are execute the test scripts...IS IT RIGHT OR NOT?
i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression
What is the file extension of the code file and object repository file in QTP?
Explain in brief about the quicktest professional (qtp) automation object model?
How to release all resources file from the QTP?