My questions is while writting descriptve programming, lets
take flight reservation.
Line1: systemutil.Run "D:\Program Files\Mercury
Interactive\QuickTestProfessional\samples\flight\app\flight4
a.exe"
dialog("text:=Login").WinEdit("attached text:=Agent
Name:").Set "mercury"
dialog("text:=Login").WinEdit("attached
text:=Password:").Set "mercury"
dialog("text:=Login").WinButton("text:=OK").click
window("text:=Flight Reservation").Activate
window("text:=Flight Reservation").ActiveX
("acx_name:=MaskEdBox").Type "111111"
window("text:=Flight Reservation").WinComboBox("attached
text:=Fly From:").Select "Frankfurt"
window("text:=Flight Reservation").WinComboBox("attached
text:=Fly To:").Select "London"
window("text:=Flight Reservation").WinButton
("text:=FLIGHT").Click
window("text:=Flight Reservation").dialog("text:=Flights
Table").WinList("text:=From").Select "13536 FRA 08.00AM LON
08.45AM SR $163.00"
window("text:=Flight Reservation").dialog("text:=Flights
Table").WinButton("text:=OK").Click
window("text:=Flight Reservation").WinEdit("attached
text:=Name:").Exist
window("text:=Flight Reservation").WinEdit("attached
text:=Name:").Set "sagar", Now i m getting the error in the
last line. it is not accepting the WinEdit("attached
text:=Name:")
Please do solve this urgent...! and i want to know how to
insert additional properties for an object and which
properties we need to select from the object spy.
Answers were Sorted based on User's Feedback
Answer / sushil
Because the property Attached Text for ********"Static -
Class:" ****** is also "Name" which is the same
for "WinEdit -Name:-" .So QTP needs additional properties
to recognize
.Give windowid as additional property
IUt will work fine
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / bfakruddin
window("text:=Flight Reservation").WinEdit("attached text:=Name:","window id:=1014").Set "sagar"
just replace your last step with this you will get it.
you have to provide sufficient information to QTP to identify object on application. QTP Failed to identify object with only property "attached text:=Name:"
that need some more information, by giving window id it feels satisfy and perfomed action what you did.
you have to learn few more about QTP,
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / g.jaipalreddy(cil testing team
u have to add windowid for your last step
after adding application will not dissplay any error message
| Is This Answer Correct ? | 0 Yes | 0 No |
How will you convert a given number to long in vbscript?
What are string functions in vbscript?
In QTP how to insert a data base check point for web based application and simultaneous link to code in expert veiw. hw to retrieve a data(single coulumn from server) that matches with inserted value manually or exported from excel sheet.
Explain different types of segment?
By default in vbscript the arguments passed to functions and subroutines are by reference or by value?
Why do we use Option Explicit?
Explain the tristate constants in vbscript?
Hi Friends, I have an issue like the describe below: I'm using QTP and I'm testing on SharePoint. As you knoe, SharePoint has a customize function for user, so that, If I add an object Web Table at the first time, that object was recognized by "index" and "html tag", after that, if someone change the display of web part, the "Index" of my object was changed as well and QTP unable to select that Web Table. Can you guide me how to identify or anyway to keep that Web Table object as unique object? Thanks a lot.
Explain the constants in vbscript?
How can you fetch the value of a cookie?
How can we return a value from User Defined Function ? For Eg. we have 2 functions. In Fun1 i am getting 2 values (a,b) and i am addding those 2 and storing in to another var (c). Now i want to pass that var(c) to another function (fun2). What will be the script?
1) How can we use VB script in testing the application? 2) What all are the things(Software application to be installed in PC) we need to learn VBscript?