I know that this sounds as if I had drunken too much....

I am using QTP 9.2 with testadvantage against a local Citrix-client.

And I don’t need help, but I would like to know why/when this happened/happens (in order to prevent that I run into such a thing again….it did cost me several hours before I learned where the effect was caused)

Has anyone ever seen this strange behavior:

Usage of
Select case … case (something) … case else … end select
makes a combobox.select in another function in another library impossible?

I have a functional library, containing a function that simulates a user logging into the system.


Function Login (strLoginName, strPassword)
Dim strEuroAIS
strEuroAIS=Environment.Value("strEuroAISWindowName ")
SwfWindow(strEuroAIS).SwfWindow("EuroAIS-Anmeldung").SwfComboBox("uteUserID").Select strLoginName
SwfWindow(strEuroAIS).SwfWindow("EuroAIS-Anmeldung").SwfEdit("utePWD").Set strPassword
SwfWindow(strEuroAIS).SwfWindow("EuroAIS-Anmeldung").SwfComboBox("ucbLanguage").Select "Deutsch (Deutschland)"
SwfWindow(strEuroAIS).SwfWindow("Nachrichten Ereignisse").SwfButton("Abbrechen").Click
End Function

[/ QUOTE ]

In another function (which happens to be placed in another library), two of the functions contain this code:


select case strOper
Case “=”
If strValue = strValue1 Then
'Condition fulfilled
Reporter.ReportEvent micPass, strReportStepName, strOK + "Variable '" +strVariable + "' = " + strValue + " as expected."
blnReturn = TRUE
'Condition failed
Reporter.ReportEvent micFail, strReportStepName, strWrong + "Expected: Variable '" +strVariable + "' = " + strValue1 + " In fact: '" + strVariable + " = " + strValue
End If
Case "<>"
(some code)
(some code)
Case Else
(some code)
End Select

[/ QUOTE ]

(The other function contains another, but more or less similar select case…end select)

When these functions exist in that way, upon execution nothing works – when attempting to use my login function, I get an error message:

Object doesn’t support this property or method: ‚SwfWindow(…).SwfWindow(…).SwfComboBox().select’

But, when replacing the Select case …. End select with a sequence of If strOper = “=” then…end if , suddenly the login-function works fine again.

if there is one select case...end select (regardless in which of the two functions), the login won't work. And it is not only the Combobox.select, even when skipping it, there are more errors.

What the {put in slang for reproductive activity}?

Best regards,