SwfEdit(””).Set hangs up
Question ID: 105234
1
0

I currently have these steps in my action:


SwfWindow("MyObj").Activate 
SwfWindow("MyObj").SwfToolbar("stackStrip1").Press "Order Packages"
varOrderPkgId = DataTable("p_OrderPackageID", dtGlobalSheet)
SwfWindow("MyObj").SwfEdit("searchStringTextEditor").SetFocus
SwfWindow("MyObj").SwfEdit("searchStringTextEditor").Set varOrderPkgId
SwfWindow("MyObj").SwfButton("searchUltraButton").SetFocus
SwfWindow("MyObj").SwfButton("searchUltraButton").Click

The line SwfWindow("MyObj").SwfEdit("searchStringTextEditor").Set varOrderPkgId hangs up. Even when I hard-code it (ie, SwfWindow("MyObj").SwfEdit("searchStringTextEditor").Set "101403"), it still hangs up. I have to press ESC in order to get things going again.
Any ideas? I’ve worked with Tom Margrave recently and he is familiar with my QTP setup.

Marked as spam
Posted by (Questions: 45, Answers: 0)
Asked on January 30, 2014 4:30 am
65 views
Answers (1)
1
Private answer

After looking at your code I have notice you are using a method SetFocus which is not a method part of QTP Object Model reference and might be part of the Infragistics tool set. If this control is not Infragistics control recommend removing method.

If removing the SetFocus does not work recommend changing the Set method to a Type method. For example

Change this
SwfWindow(''MyObj '').SwfEdit(''searchStringTextEditor'').Set varOrderPkgId
to
SwfWindow(''MyObj '').SwfEdit(''searchStringTextEditor'').Type varOrderPkgId

Marked as spam
Posted by (Questions: 2, Answers: 98)
Answered on January 30, 2014 4:32 am
0
Removing SetFocus and using TYPE did the trick. Thank you.
( at January 30, 2014 4:33 am)
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top