Topic
6 replies Latest Post - ‏2013-09-18T11:23:46Z by CristinaConstantin
CristinaConstantin
CristinaConstantin
5 Posts
ACCEPTED ANSWER

Pinned topic What causes "Window is disabled" error?

‏2013-09-16T12:59:23Z |

Hello,

Does anyone knows what attribute/property causes "Window is disabled" error?

During a java script, when I try to click on a child window, i get this error "Window is disabled".

Before this part, RFT interacts with the windows and the objects from the GUI very well.

code example:

...

TestObject[] win = find(atDescendant(".captionText","Create MES - Choose MES Content"));
ShellTestObject child = new ShellTestObject(win[0]);
System.out.println(child.getProperties().toString());
child.click();

...

console>>  "x=446, background=java.awt.Color[r=212,g=208,b=200], fontSet=false, alwaysOnTopSupported=true, name=dialog1, focusTraversalKeysEnabled=true, locationOnScreen=java.awt.Point[x=446,y=186], bounds=java.awt.Rectangle[x=446,y=186,width=708,height=527], cursorSet=true, defaultCloseOperation=2, font=com.rational.test.ft.value.FontInfo[name=Dialog,style=0,size=12], opacity=1.0, size=java.awt.Dimension[width=708,height=527], focusTraversalPolicyProvider=false, preferredSize=java.awt.Dimension[width=708,height=527], focusTraversable=true, width=708, focused=true, focusTraversalPolicySet=true, validateRoot=true, maximumSize=java.awt.Dimension[width=2147483647,height=2147483647], backgroundSet=true, enabled=true, autoRequestFocus=true, visible=true, minimumSizeSet=false, resizable=true, title=Create MES - Choose MES Content, lightweight=false, focus=false, location=java.awt.Point[x=446,y=186], undecorated=false, focusableWindowState=true, componentCount=1, opaque=true, showing=true, foregroundSet=false, alwaysOnTop=false, preferredSizeSet=false, valid=false, foreground=java.awt.Color[r=0,g=0,b=0], maximumSizeSet=false, warningString=null Object, doubleBuffered=false, class=com.ibm.gfc.proposalEditor.services.MesWizardDialog, focusableWindow=true, focusCycleRoot=true, minimumSize=java.awt.Dimension[width=708,height=527], ignoreRepaint=false, height=527, alignmentY=0.5, displayable=true, alignmentX=0.5, modal=true, locationByPlatform=false, focusOwner=false, active=true, focusable=true, y=186, mousePosition=null Object"

Do you have any idea on what properties should I check?

Thank you.

Updated on 2013-09-18T11:42:08Z at 2013-09-18T11:42:08Z by CristinaConstantin
  • Y5QY_gerben_delange
    Y5QY_gerben_delange
    34 Posts
    ACCEPTED ANSWER

    Re: What causes "Window is disabled" error?

    ‏2013-09-16T18:02:32Z  in response to CristinaConstantin

    hmmm usually when some pop-up window is being displayed.. if thats not the case then u can try re-activating the window using the iwindow interface:

     

    http://pic.dhe.ibm.com/infocenter/rfthelp/v8r1/index.jsp?topic=/com.rational.test.ft.api.help/ApiReference/com/rational/test/ft/object/interfaces/IWindow.html

    method: activate

     

    let me know if this solves your trobbies.

    houdoe,

     

    g

    • CristinaConstantin
      CristinaConstantin
      5 Posts
      ACCEPTED ANSWER

      Re: What causes "Window is disabled" error?

      ‏2013-09-17T11:05:15Z  in response to Y5QY_gerben_delange

      Hi Gerben,

      This window is a child window, and no other pop-up is displayed.

      I have tried activating it , but i still got the same behaviour.

      Actually, the problem comes with a specific flow:

      1.Open window.

      2.Do some changes(click on the window and interract with the buttons, and it works fine)

      3.Close the window.

      4.Open the window again.

      5.Do some changes (eg: click on it)

      The error "Window is disabled" appears at step 5, where it finds only one window.

      Updated on 2013-09-17T11:06:21Z at 2013-09-17T11:06:21Z by CristinaConstantin
      • Y5QY_gerben_delange
        Y5QY_gerben_delange
        34 Posts
        ACCEPTED ANSWER

        Re: What causes "Window is disabled" error?

        ‏2013-09-17T13:26:53Z  in response to CristinaConstantin

        Have you tried clicking it manually at step 5? It might be a bug in the AUT..

        Have you tried to unregistering the testobject after step 3, and searching for it again after step 4? I guess you did because you state that only 1 window is is being found at step 5 (propably tested this using the testobject array's .lenght propertie).

         

        Have you tried this method:

        clickDisabled

        void 
        clickDisabled()
        
        Click on a window that is disabled or waiting on the modal dialog.

         

        Detail description:
        Clicks in a benign location on the top-level object to get other action-sensitive windows to change their state. All actions performed against an inactive window are recorded as a call to this method. Top objects become inactive when a modal dialog box prevents them from becoming active. Actions against an inactive window cause the topmost modal dialog box to be activated, rather than the test object.
        Example:
        Click on the disabled PlaceOrder dialog in ClassicsJava application. 
        placeAnOrder(ANY,DISABLED).clickDisabled();
        Since:
        RFT6.1.1.1

         

         

         

        • CristinaConstantin
          CristinaConstantin
          5 Posts
          ACCEPTED ANSWER

          Re: What causes "Window is disabled" error?

          ‏2013-09-17T14:17:38Z  in response to Y5QY_gerben_delange

          Yes, I do search it again on step 4. I also talked to the dev team, and it seems that  the logic of the aplication is this one:on step 4, the window is reactivated (not created again).

          Regarding clickDisabled(), this is the error I get: 

          [testcases.complex.Case_3.runTest had an unhandled error. ] failed
          Class com/rational/test/ft/sys/graphical/TopLevelWindow illegally accessing "protected" member of class com/rational/test/ft/sys/graphical/NativeTopLevelWindow

           

          I have also tried to wait some time( sleep(50) ) before step 4, and nothing.

          The strangest thing is that when I split the flow in two scripts: one containing first 3 steps and the other one steps 4 and 5, everything is ok (I can click on the window)

           

          • Y5QY_gerben_delange
            Y5QY_gerben_delange
            34 Posts
            ACCEPTED ANSWER

            Re: What causes "Window is disabled" error?

            ‏2013-09-17T14:22:54Z  in response to CristinaConstantin

            did you try unregistring all testobjects before searching again in step 4? if not, i would try this method:

             

            unregisterAll();