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 can we import into Excel "Details" ,"Result" ,"Time" parameters from within a Results Report which is generated after a Run error when a script is executed in QTP? Refer E.g below Status Functionality Description RunDate Fail Login User should be able to Login 12/3/2007 StartTime EndTime Details* 1:31:58 PM 1:32:29 PM (this one i want)
What is the use of text output value in quicktest professional?
write a script to verify links on any web page by using descriptive method by creating a description object (give a filter condition only link) ... need to verify expected like name by reading
Can any one explain me what is the procedure to connect the remote desk by using QTP 9.2 ?
What are the challenges you faced during you entire life automation ?
How the smart identification is used in real time?Please explain with an example
Give the syntax to import/export xls into qtp.
Hi Friends, Im planning to do certifcation in mercury Automation Tool QTP.But I Didnt get any clear details regarding course syllabus, fees, where to approach, and which certification would be useful for the experienced testers? can any one send me the details?
I have two For loop, first For loop does is creates a customer and input the customer info and then the second for loop within the first for loop does the follows which is capture the customer name and verify the with the data within the datatable. The problem I am coming across is that when it goes through the second time creating another customer and then verify the second customer then it creates the following during runtime. I want is to have the customer2 below Customer1 under the Customer_from_Apps. Any help will be greatly appreciate it. Customer Customer_from_Apps Customer_from_Apps1 Customer1 Customer 1 Customer2 Customer2 Window("Customer Desktop").Window("Customer Tracking (Privacy").WinObject("TreeView20WndClass").Click 92,244 runtimevalue = .VbTreeView("vbname:=AppServerTree").GetROProperty("Selectio n") Customer_Val= Datatable.GlobalSheet.AddParameter ("Customer_from_Apps",runtimevalue) row=datatable.getsheet("Global").GetRowCount For x=1 to row datatable.SetCurrentRow(x) Data_Val=Datatable.Value("Customer",dtGlobalSheet) If (trim(Customer_Val)=trim(Data_Val)) Then Reporter.ReportEvent micPass, "Customer validation successful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val else Reporter.ReportEvent micFail, "Cusotmer validation unsuccessful", "Actual Value: " &Data_Val&vbcrlf& "Customer Value: " &Customer_Val End If Next
What is the process of synchronizing qtp and aut?
Explain how you can delete excel file in qtp?
How to automate a script in mainframes environment? I have the terminal emulator Add in. Describe in detail.
How does quicktest professional identifies the object in the application?
Is the qtp course will help to create a virtual object?
hou can we use vb script in qtp could u tell me breafly