Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
SwfWindow recognized as Window
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi everyone. I have been doing some test automation on a Windows Forms applications. I created a script that worked fine, in which everything was added to the OR as SwfWindows/SwfButtons etc..

Out of sudden, the script stopped working. If I use the .net control spy on the app, everything is recognized as Windows/WinObjects. But if I try it on another .net App (while on the same test, without changing anything) everything is correctly identified as SwfWindows/SwfButtons etc.

An ideas, why this might have happened??

I´m using QTP 11, with the .net, web, and VB add-ins. I'm recording while on any open application and I have run the addFullTrust executable. I tried repairing, QTP and reinstalling .Net addin.

If I record right now, i get something like this:

Code:
'' Windows forms App ONE
With Window("window")
    .Activate
    .WinObject("WindowsForms10.SysTabControl32").Click 110,14
End With
'' Windows forms App TWO
With SwfWindow("Demo").SwfWindow("DC")
    .SwfRadioButton("Scheduled").Set
    .Activate
End With
Reply
#2
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi Chrono160,

Even i have encountered exactly the same problem. In my case, i have a simulator that has been developed in Windows Forms. It was a strange behaviour of QTP that sometime it'll recognize the Swf objects and most of the time it'll show them as WinObjects. Later i found out a way and it was like every time i launch the simulator (it is an exe file) through QTP, it could recognize the object comfortably. And it was a saving grace for me as during run-time the QTP is going to launch the simulator, so everytime it could recognize the objects.

Atleast client will not have a clue about this awkwardness Tongue
Reply
#3
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi PrabhatN,

I managed to solve it in the weirdest way... After reinstalling QTP, and trying lots of ways of fixing it, the script ended up working again after I rebooted the pc.

No idea whyTongue

Thanks for your help!
Reply
#4
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi,

The following setting have to be done in QTP for it to identify the objects as SwfWindow, SwfTable, etc..

1. Open QTP.
2. Go to "Record & Run Settings"
3. Click on "Windows Application"
4. Selct "Record & Run test on any open windows based application" radio button.
5. Click on Apply and save.

Now spy and check, the object will get recognized as expected.

Thanks,
Nandana
Reply
#5
Solved: 11 Years, 3 Months, 3 Weeks ago Big Grin 
Nandana's answer worked perfectly.
Cheers,
Michael
Reply
#6
Solved: 11 Years, 3 Months, 3 Weeks ago
[quote='Nandana Vijay Kumar' pid='18691' dateline='1320741135']
Hi,

thnx, Nandana.
but problem is, it do not work sometimes. In such case, What will be the solution.
Reply
#7
Solved: 11 Years, 3 Months, 3 Weeks ago
All you need to do is just record the swf objects and from then on it will start working
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  swfwindow object name getting changed after each run saniya 1 1,673 10-10-2018, 09:02 PM
Last Post: TheGlovner
  Telnet command not recognized Sanjana1987 1 2,041 09-20-2017, 03:16 PM
Last Post: Ankur
  Objects are being recognized as "Windows for Menu item list (Browser-firefox, UFT 12) akhandesh 0 2,527 05-27-2015, 06:29 PM
Last Post: akhandesh
Smile Importing Excel sheet - Reference Values are not recognized michiusa69 3 7,877 01-23-2015, 02:36 AM
Last Post: lkng2001
  IE Tester feature not recognized by UFT12.01 saraiado 2 2,748 12-23-2014, 09:41 AM
Last Post: vinod123

Forum Jump:


Users browsing this thread: 1 Guest(s)