How to get the attribute value of a Java Swing application object in SilkTest?

StackOverflow https://stackoverflow.com/questions/19514938

  •  01-07-2022
  •  | 
  •  

سؤال

Every Java Swing application has some attribute like caption, priorLabel, className, accessibleName and name. These are displayed in the Locator Spy; some with values and some without values.

My question is: The way we have GetDomAttribute() method available for web applications, do we have any such method available for Java Swing applications in SilkTest?

What if I want to get the aforementioned attribute values in a java swing application even if these attributes are not having any value (in such situation, I suppose, I will get an empty string).

Please suggest!

هل كانت مفيدة؟

المحلول

I think the closest match for GetDomAttribute() would be the dynamic property support in Silk Test:

  1. Use GetPropertyList() to get a list of properties available for a certain object.

  2. Use a property name from that list with GetProperty().

  3. If that is not sufficient, you can also use DynamicInvoke, which is documented here (also includes dynamic properties).
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top