Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Same Pop up in different windows
#1
Not Solved
Hi,

The issue I am facing is about a pop up having an OK button with same title in different windows, i.e. for ex:
Code:
Window("Window1").Dialog("My Dialog").WinButton("OK")
SwfWindow("AnotherWindow").Dialog("My Dialog").WinButton("OK")

I would like to write a function that would take two parameters as input, say WinType for Window/SwfWindow and another parameter as WinName for Window1/AnotherWindow and the operation to be performed in the function is .Click

Code:
Call Save ("SwfWindow","AnotherWindow")

Public Function Save(WinType, WinName)
   WinTypeName = WinType & "(" & chr(34) & WinName & chr(34) & ")"
' WinTypeName = SwfWindow("AnotherWindow")
   WinTypeName.Dialog("My Dialog").WinButton("OK").Click
End Function

The following Run Time Error is displayed:
Object Required: 'WinTypeName'

Appreciate any help on the above or on handling pop up across different windows.

Thank You for reading,
Vamseekk
Reply
#2
Not Solved
I think qtp should be able to recognize the "different" pop ups with "same title" when coming out of "different" parent windows... just make sure that your is not the similar case as https://www.learnqtp.com/forums/Thread-O...ot-visible
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
Reply
#3
Not Solved
Thank You for the reply Ankur.

QTP is able to recognize different pop ups uniquely based on the parent, but as you see in my question I would like to send Window Type and Window Name of the pop up as input parameters to the function and perform the click on the OK button.
Basically I would like to write a function that would take Window Type (say Window or SwfWindow or another other window type) and Window Name (say MyApp or TestApplication) as input parameters and click on OK button.

Thank You,
Vamsee
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  SAP GUI gets hanged while closing the Windows Pop Up kathirvelnagaraj 0 5,320 10-23-2015, 06:47 PM
Last Post: kathirvelnagaraj
Rolleyes QTP pop up window handling piyush8793 3 16,396 10-15-2015, 11:03 PM
Last Post: Venkateswarluponna
Exclamation Login & logout in Siebel and clicking pop-up button yuetling926 7 10,696 07-09-2014, 10:43 PM
Last Post: hhamilton
  select a date from pop-up calendar Dertjon 1 5,585 05-13-2014, 02:29 PM
Last Post: Ankur
  QTP not clicking on Yes button in the IE pop up dialog adityasrinivasb 2 9,325 09-29-2013, 11:01 PM
Last Post: prashantrawat101@gmail.com

Forum Jump:


Users browsing this thread: 1 Guest(s)