Forum Discussion

ScottVaughn1962's avatar
ScottVaughn1962
Occasional Contributor
7 years ago
Solved

How can I just click a certain x y coordinate on a screen regardless of object?

I am testing an application called OnBase.  In this particular instance, when I select certain menus and buttons a screen pops.  The problem I have is when I record, it is recording specific information from the screen which dynamically changes every time that screen displays a new instance.  For example: I recorded something and it built aliases using the number 7431, which happens to be the "appeal number".  When that screen is closed, that appeal number is no longer going to be used on that screen, because when that screen is opened again, it will use the next increment of appeal number.  Therefore, 7431 will no longer be part of the aliases and TestComplete can no longer find the objects which were on that screen.  I need to know how I can just click on an x y location, which will then cause a drop down list and then click again to select a value from the dropdown.  I would need to perform this action many times because again all of the objects on this screen have been built using the appeal number which when replayed no longer exist.  I would like to do this via keyword testing methods, however, if that's not possible and I can be shown how to do via vbscript, that would work as well.  I hope that all makes sense.

 

I'm using Version 12.31.1833.7.

  • dganov's avatar
    dganov
    7 years ago

    Please try the following:

    1. Open NameMapping project node

    2. Find and select object Sys.obunity.HwndSource_CanvasRibbonWindow7

    3. Replace number in WndCaption property value to "*" (without quotes), so something like "Appeal ID: *" should be.

    It will mean that TestComplete should find any object which WndCaption starts with "Appeal ID: " and ends with any string.

11 Replies

  • Marsha_R's avatar
    Marsha_R
    Champion Level 3

    You can certainly do it by using the Record feature and clicking on all the objects you want, but be aware that by choosing to use coordinates, your test will very likely not be portable or flexible.  If anyone ever runs the test on a different machine or you run it on a laptop screen instead of  a monitor, it will have problems.

     

    Let's see if we can help you identify the objects in some other way.  Let's see screenshots of the full Object Spy results for a couple of your fields so we can take a look.

    • ScottVaughn1962's avatar
      ScottVaughn1962
      Occasional Contributor

      Marsha_R,

       

      I've attached a file documenting the manual steps, TestComplete recorded steps then finally the TestComplete playback steps for you to review.  Also, I stopped at step 3 in the playback steps because if I can't get passed that, there's no sense in continuing.

       

      Please let me know if there is anything else I can provide.

       

      Scott

      • Marsha_R's avatar
        Marsha_R
        Champion Level 3

        ScottVaughn1962 - 

         

        Thanks for the info

         

        Can you take ObjectSpy and look at WorkViewApplicationRibbon and then post a screenshot of the Advanced results?

         

        See attached for an example.

         

         

         

         

  • cunderw's avatar
    cunderw
    Community Hero

    Coordinates would not be a reliable method of interacting with your application either, what happens if the resolution changes?

     

    Are you manually updating your name mapping attributes or just using the auto-generated ones? I would look and see what attributes you can use that are not the appeal number to identify your on screen objects.