Forum Discussion

escap89's avatar
escap89
Contributor
8 years ago

ObjectState is invisible but its shown in application (Enabled/Exists = True)

Hello,

 

Application: Power Builder 12

Tests: Scripts - using Python

Identify objects: directly (true name)

 

Short introduction:

Lets say that i have app that letting u add a person to a country so it have 2 main windows:

Country_Object (country_name)

Person_Object (name,subname,gender)

 

In 80% countries if i click "add" button that opens Person_Object i can see 3 fields:

all of them are visible and i can make tests easly.

 

In 20% countries if i click "add" button that opens Person_Object i can see also 3 fields:

name,subname is visible for TC and i can write with my tests to these fields whatever i want but radiobuttion "gener" with option male/female is not clicable with objectspy (i mean i cant identify it).

If I open object browser  and  compare gender field properties between these 80% and 20% i can see difference:

80% has:

ControlIndex: 1

Visible: True

VisibleOnScreen: True

ObjectState: True

20% has:

ControlIndex: 2

Visible: False

VisibleOnScreen: False

ObjectState: False

 

 

In all 100% i can see  all fields in my application but i cant identify them with object spy so my tests also cant identify them.

 

Ofc firstly i asked developer whats the diffrence between two the same objects (user perspective).

He said its all the same, just order may be diffrent (prolly affect for controlindex in TC) but it shouldnt matter right?

He have some "objects substitution" on opening user window event but it do nothing with that specifing field (gender: male/female)

He blames TC for that problem.

 

Countries/Users are just an example: i have that problem with a few fields ( usually radiobutton/dropdown).

 

Any1 of u know why TestComplete "visible" property in some cases are false if i can see these fields.

 

12 Replies

  • baxatob's avatar
    baxatob
    Community Hero

    Hi,

     

    Check the class property for both radiobuttons. Are they members of one class?

    • escap89's avatar
      escap89
      Contributor

      baxatob

      Class property?

      In TC i dont have that property (as u can see on screen)

      Developer said that all properties are same for both fields (visible  / invisible).  Well i think in PowerBuilder they do not have class property too.

       

      shankar_r

      Yes i am able to do whatever i want with these fields manually in application.

      If i put object spy coursor on object it dosent see it but i can see it in object browser - diffrence is visible property.

       

      Colin_McCrae

      1. Yea but i need to click for example dropdown field to choose smth with key("down") and i cant do that atm.

      2. I asked developer if its posibble he have that bug.

       

      What developer told me before was that in these 20% types of "countries" he replace some fields on "open event" in powerbuilder but in logic way it shouldn't affect in this  case - cause he replace a field that i dont want to click ( i skip that one anyway).

       

      • escap89's avatar
        escap89
        Contributor

        Colin_McCrae

        2. Dev answer:

        "What Pb is doing is unfortunately not known to me.

        We replace actual dataobject insinde Datawindow to another almost the same. We dont create publicly a new datawindow"

         

  • shankar_r's avatar
    shankar_r
    Community Hero

    Hi,

     

    Are you able to click the Radio Buttons or Drop Downs manually for the 20% members.

     

    And If you are not able to identify some of the Objects, Check whether those objects are Customized objects of your application. if not you should be able to identify it.

    • Colin_McCrae's avatar
      Colin_McCrae
      Community Hero

      Not with powerbuilder applications, but I've had similar scenarios twice.

       

      1. The visibility state properties were simply wrong. TC was reporting them as not visible or visible on screen. They were. In the end I found a field value of the object that gave the correct visibility value.

       

      2. The application was creating duplicates. This was visible in the object model. The first instance was not correctly disposed of. A second instance was created. The first instance was invisible, but still there. As a result, my tests got confused as they didn't know which one to use. I raised a bug. They fixed it.

       

      As I say, not powerbuilder. So your scenario may be totally different. But at least a couple of options to consider.