I’m a relatively inexperienced developer. I’m automating within a mainframe via a JRE, so there are no UI elements and therefore no selectors to rely on. Screen scraping has also been disappointingly unreliable.
I resorted to specifying a clipping region to screenshot, saving the [actual] image, and using the ‘Compare Two Image Files Using Threshold’ activity to compare it to the [expected] image, as a way to validate success or failure.
I’ve now discovered that display size - in this case, an increase from 14" to 15.6" - breaks my otherwise stable solution. In the attached attempt, I find an image that’s always visible, pass it as an input to the ‘Get Position’ activity, and then specify the direction as ‘TRANSLATE’ and the size as L0, T[#], R0, B[#] in the ‘Set Clipping Region’ activity before taking and saving the screenshot. So far I’ve run this ‘Test’ workflow on both machines and in 2 of 3 cases, the outcomes were close enough to use in ‘Compare Two Image Files Using Threshold’.
Am I experiencing confirmation bias or can this actually work? If the latter, how can I improve the reliability of this slightly modified approach? Lastly, is there a better way to do this?