Friday, August 17, 2018

Surface Automation Example with Region Mode in Blue Prism

Surface Automation is used with Thin Clients. As a new term introduced, we should know about it.

Thin client are the one which are not directly installed on local machine and it's elements are not accessible to be spied. This happens when most of the business applications are installed on server and business unit access applications using client machine with CITRIX application. While Thick Client Applications are installed on local machine and their elements are accessible to be spied and automated. For example EXCEL, CALC or Blue Prism for that matter.


Coming back to Surface automation, as we understood elements of Think Clients are not accessible to be spied and automated in those case we use technique called Surface Automation. Where we identify elements by mapping application's surface with rectangle boxes or called each box as region.

Let's consider a Thick client application and automate it using Thin client concept for now as I am limited to use CITRIX application for this blog.


Step 1: Configure Application modeler and SPY elements

Here we are going to interact with application and not creating any business flow. Let's go to Application modeler and configure Calc application as we do normally. and launch application using application modeler. For spying elements of the application we should click on Identify button, application will open in WIN32 mode as displayed in screenshot.


 However we would consider this automation to be Surface the we need to switch spy mode which we can do by pressing ALT key. View would change to Accessibility Mode (AA) which would certainly don't need. (I should talk about different SPY modes, I must create separate page for the same shortly.) How ever AA mode looks like following:


Let's try one more time to press ALT key and following mode would be displayed as needed:

As we can see Calculator is highlighted RED as I have pressed CTRL and hover over the application. BP selected application as a region to be spied and it will fetch all propertied related to this region in the same way it does for JAVA for web application. Attributes of this region would certainly be different for this.


Step 2: Spy elements using region mode

As mentioned earlier, we need to create map of regions to identify our elements. Click on region and create rectangular boxes at the element you need to interact with. I have created a box at button "1". In the same way create boxes around elements.



Step 3: Create Object flow and RUN

I believe I must not explain much about here, screenshots might explain everything them self.

Following is a flow with more steps to press calc key in different stages. I have added hard coded wait for 2 seconds as it requires improvement. The other screenshot show how to click on elements which are spied earlier.


 


Following is an example of performing calculation in single stage followed by a screenshot of calling those actions.




This is quick blog to understand how it work however I have not yet covered even basics of surface automation. We can compare screenshots and spy fonts. Okay following is screenshot how it automatically find out fonts:


We can manually change setting to make this search more quicker.

Feel free to ask queries if any!


No comments:

Post a Comment