Ask a Question

WinAppForm Multi-scales Testing ISSUES(let's say 100% & 125% scales) w/ Test Complete

bdrummond
Contributor

WinAppForm Multi-scales Testing ISSUES(let's say 100% & 125% scales) w/ Test Complete

Hello all,

 

I am here to seek any advise or a solution regarding to multi scaling testing. Meaning, using a Window-Application in a same monitor but different scales.

 

I have created a combination of scripts and keywords test where at the time , Window application test only conducted in 100% scale, or at least that's where I started first. Everything went good (As good as it can get at present), until i am running my existing test with 125% scaling on Windows.

 

Code all are fine, apart from one or two niggly things - such as - Mouse click X/Y coordination, Picture (Region) verification on buttons and tabs. This is where am seeking any advise and potential solution for those whom exposed to this obstacle before.

 

for e.g., I have a winform app ribbon strip created by devcomponents dotnetbar (which for the record - I couldn't access any of the objects (the tabs) apart from manually specifies the X/Y coordinate and click method(). see the 1st image) in 100% and 125%. between 100 & 125% the spacing/placing of each of this tabs are different, there for, I use this If...Else statement...

 

ribbonStripNumRes.Click(478, 9);
    
  /*125% Guard Work*/
    
  //If it's in 125% the chart ribbon strip won't be clicked
  var chartPanel = getChartRibbonPanel("ribbonPanelCharts");    
  chartPanelVisible = chartPanel.Visible;
    
  //if chart ribbon panel visible
  //...leave a message
//...Go on and click new chart //else if it not visible //...Click on the correct Coord for chart ribbon panel if (chartPanelVisible == true){ Log.Message("On 100% Scale"); chartPanel.WinFormsObject("ribbonBarChartsExplore").Click(42, 28); }else{ Log.Message("On 125% Scale"); ribbonStripNumRes.Click(529, 17); getChartRibbonPanel("ribbonPanelCharts").WinFormsObject("ribbonBarChartsExplore").Click(42, 28); } //Maximise Chart Form. getChart("ChartForm").Maximize();

 

This work okay - and i think i wont spend much more time on it...

 

Then when it comes to the Region Checkpoint...originally written with only 100% scaling in mind - I have this:

 

function xplotTabOrder(){

    //Crossplot Properties Window Form Object -> WinFormsObject("frmClusterAnalysis")
    var xplotPropertiesWin = ic.WinFormsObject("frmClusterAnalysis");
    var xplotPropertiesWinVisible = xplotPropertiesWin.VisibleOnScreen;
if (xplotPropertiesWinVisible==true){ //Region checkpoint to check the tabs in the right order. Log.Message("TEST CASE C113327 (CROSSPLOT - TAB ORDER)"); Regions.xplot_Properties_Tabs.Check(Regions.CreateRegionInfo (Aliases.IC.frmClusterAnalysis, 7, 35, 233, 28, false)); }else{ Log.Message("Crossplot Properties Form Cannot be seen"); } }

but when i run this in 125% scaling - for the obvious reason it failed, because of the Region isn't matching. see 2nd image

 

Environment manager only tackles web browser and screen resolution, which irrelevant for my WinApp testing.

 

Any Advise on how to tackle this and share your expert experience, I would much appreciate it : )

 

Thank you all

 

BD

 

0 REPLIES 0
cancel
Showing results for 
Search instead for 
Did you mean: