Forum Discussion

DiwakarDev's avatar
DiwakarDev
Regular Visitor
6 years ago

Automation of wpf app - Managing multiple screen resolutions

I am working on automation a wpf app using testcomplete. My issue is i am recording the tests in a pc which has a resoltuion of 1366*768. I need the tests recorded in 1366*768 resolution to run in a higher resolution screen like 1920*1080. Can you suggest ways to do it, it it is possible.

3 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Try to either remove coordinates from the recorded .Click() events or replace them with -1 value.

     

  • Vallalarasu_P's avatar
    Vallalarasu_P
    Frequent Contributor

    There are two options

     

    Either Replace the click without coordinates

    Read the Coordinates in run time and Click on the center of the object

     

    Ob_height = Object.height

    Ob_Width = Object.Width

     

    Object.click(Ob_height /2,Ob_Width/2 )

    • cunderw's avatar
      cunderw
      Community Hero

      There is no need to manually grab the cooridnates, not specifying cooridnates or using -1, will default the center of the object.