Forum Discussion

biswadash's avatar
biswadash
Occasional Contributor
7 years ago

How to deal with dynamic elements in Java Applet application

I have a task where I have to update a form and then Click OK for the final Confirmation. While recording I do update the form and then click OK for the confirmation but, while Playback the tests are failing at the final Confirmation panel. I have tried to grab the element and found that the value of the OK button changes everytime.

 

For example :

 Name Mapping :

Aliases.browser.pageOracleFusionMiddlewareFormsS.object.PluginEmbeddedFrame.Main0.MDIContainer15.EwtComponent14.ScrollBox13.ScrollBox_112.FormDesktopContainer11.FWindow554.LWComponent557.AlertPane559.LWComponent563.ButtonBar569.PushButton20​

 

For first attempt I got the values as PushButton5 and for the next attempt the value have changed to PushButton20.

 

I am not sure how can I resolve the issue.

  • biswadash's avatar
    biswadash
    Occasional Contributor

    Thank you for the suggestion but, If you observe from the attachment (My project Name Mapping) then you can see that there is a dynamic window generated for every test and the window has the OK button which I need to use for my tests so, I am not sure how we can use wildcards for dynamic windows.

     

     

    • Marsha_R's avatar
      Marsha_R
      Moderator

      I have a task where I have to update a form and then Click OK for the final Confirmation. While recording I do update the form and then click OK for the confirmation but, while Playback the tests are failing at the final Confirmation panel. I have tried to grab the element and found that the value of the OK button changes everytime.

      ________________________

       

      If PushButton is what's changing every time, then you use PushButton* in your mapping

       

      If FWindow is also changing, then use FWindow* and PushButton* in your mapping. 

       

      It also looks like you are letting TC automatically update the name mapping.  Turn that off and use the wildcards.  That way TestComplete will look for the pattern FWindow(some number) followed by a child farther down PushButton(some number) and you don't have to know what the numbers are.

       

       

  • biswadash's avatar
    biswadash
    Occasional Contributor

    Hi Marsha,

     

    Thank you for your suggestions. Can you please let me know how should I turnoff the settings for TestComplete.

     

    Thanks,

     

    Biswa

  • biswadash's avatar
    biswadash
    Occasional Contributor

    Thank you Marsha for your help! By turning off the setting in TestComplete the dynamic numbers for the elements were resolved and I have manually done the name mapping.

     

    Thanks,

     

    Biswa