Topic
  • 1 reply
  • Latest Post - ‏2013-01-08T10:44:57Z by SystemAdmin
SystemAdmin
SystemAdmin
16727 Posts

Pinned topic Getting a dynamic testObject's simpleName

‏2013-01-07T16:17:15Z |
Hi Guys,

I was wondering if it is possible to get the simpleName value from a dynamic TestObject.

When using mapped test objects (using the test object map), this attribute will registered (see screenshot).

What I want to do is to dynamically find an object, and then get the objects simple name. It should look something like this:

TestObject [] button = find(atDescendant(".class", "blaat"));
if (button.length > 0){
String simpleName = button[0].getSimpleName();
}

But of course this wont work, because the method getSimpleName() is undefined for the type TestObject..
can anybody help me out?

Best regards,

g
Updated on 2013-01-08T10:44:57Z at 2013-01-08T10:44:57Z by SystemAdmin
  • SystemAdmin
    SystemAdmin
    16727 Posts

    Re: Getting a dynamic testObject's simpleName

    ‏2013-01-08T10:44:57Z  
    I figured it out, the simplename value can be obtained using the getDescriptiveName() medhod.
    regards,

    g