简体   繁体   中英

Cannot use JavaEdit.Object.setText (qtp vbs)

I am using QTP 11 for automation and I have come accross an issue I don't really know what to do with.

I am trying to set the value of a JavaEdit field using it's native setText method like so:

JavaWindow("Window").JavaEdit("Edit").Object.setText "value"

This has worked like this in the past, but now I keep getting "method not supported" errors at runtime. The objects exist in the object repository and are referred to correctly, and are visible in the application under test.

Does anyone know what might be the cause of this?

I am not sure, but as far as I remember it should be

JavaWindow("Window").JavaEdit("Edit").Object.setText(value)

in brackets. I might be mistaken though. Could it be that the TextEdit has become read only?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM