Hi Karthik,
Thank you for reply.
I have tried the link you give for on
Calc.HTM.it works ok as per your Calc 1, capture the value. However, it will be like the way working in gmail ( Day1), not current application within my local computer.
In the below message I read the reason you write to Shilpa.
My question-->WINDOW 7 is not a good platform for QTP practices then?
if it is true, do I have to switch to other OS?
i hope not. because it will create lots of Chaos.
I have tried below code , thanks to Shilpa for code (SystemUtil.Run "calc.exe") ,
I also change those winButton name to 1,2, 3, _,+ etc as per your instructions.
it works but cannot perform "add object to Local" function.
as QTP cannot read the calculator , but only 'Window' object.
so it is not Window calculator in the Screen of Object Slection - Add Repository , but Window : window ( as per attachment, would you please have a look?).
VBScripts :
----------------
'Window("Start menu").WinButton("All Programs").Click
'Window("Start menu").WinTreeView("SysTreeView32").Select "Programs Folder and Fast Items;Accessories"
'Window("Start menu").WinTreeView("SysTreeView32").Select "Programs Folder and Fast Items;Accessories;Calculator"
SystemUtil.Run "calc.exe"
Window("Calc").WinButton("8").Click
Wait 2
Window("Calc").WinButton("+").Click
Wait 2
Window("Calc").WinButton("1").Click
Wait 2
Window("Calc").WinButton("=").Click
Wait 2
Window("Calc").Close
-------------------------------------------------
Do you have better solution for CALC application be able to read by Window 7 in QTP practices?
I have go thru today Day 4 exercise, but unable to do " Add objects to Local "
Thank you
Regards,
Kakinang99
---------- Forwarded message ----------
From: Karthik QTP <qtp.ele...@gmail.com>
Date: Jun 9, 7:35 am
Subject: Windows Calculator application on Windows 7
To: QTP eLearn Team
Shilpa - The reason is
1. Windows 7calculatorwas designed differently.
2. QTP identifies the object differently too.
3. Alternate, Instead of recording add each object and change the name
for that object to what you desire ... like 1,2,3,4 etc.
4. Also the winedit field may be a prob during GetROProperty ... we
can find work arounds
On Jun 8, 1:42 pm, ShilpaChanda <shilpacha...@gmail.com> wrote:
> Hi Friends,
> I am new to this group. I am using Windows 7 and trying to work with
>Calculatorapplication . I tried with the following changes to record
> the script
> New Test->Record->on the WebTab Selected the RadioButton "Record and
> Run test on any open browser"->on Windows Application Tab selected the
> RadioButton Record and Run Only->Seleced the "+" button and added the
>calculatorpath from the C drive i.e. C:\Windows\system32\calc.exe-
> >clicked OK->Clicked Apply->clicked ok.
> After this when I tried performing the operation 8*2 on thecalculator
> and the script generated by QTP is :
> Window("Calculator").WinButton("Button").Click
> Window("Calculator").WinButton("Button_2").Click
> Window("Calculator").WinButton("Button_3").Click
> Window("Calculator").WinButton("Button_4").Click
> Window("Calculator").Close
> Please could any one help me why the script did not dispaly the
> WinButton("8").Click,
> WinButton("*").Click,WinButton("2").Click,WinButton("=").Click in the
> 1st,2nd,3rd,4th lines.
> Any help is appreciated.
> Thanks,