cancel
Showing results for 
Search instead for 
Did you mean: 

Region spy triggers when region does not exist

ThomasWarnaar
Level 4
Hi all,

I have region spied a button on a Salesforce page in Google Chrome. Now I find that I get errors because the region is found even when the region is non existent. It is definitely not visible on screen and it also does not exist in any tabs or sub tabs within the website or anywhere else. I also checked the colour sensitivity but without success. How is this possible? I thought region spy basically matches visually what's on the screen. I can't find any other way to check the existence of this particular button and me and my colleagues are stumped, so any help would be appreciated.

I did try for a specific page (the website is dynamic so using XPaths as standard is a royal pain) to highlight the button both when existing and when not existing and both times it was also found. So something strange is happening but that's why I need the region spy.

Thank you,
Thomas

------------------------------
Thomas Warnaar
------------------------------
7 REPLIES 7

Hi Thomas,

I would also want to check if there was a thought around using the pre-built Salesforce assets on DX which provides API integration?


------------------------------
Shashank Kumar
DX Integrations Partner Consultant
Blue Prism
Singapore
+6581326707
------------------------------

John__Carter
Staff
Staff
Hi Thomas - check the type of region you are using. Depending on how it is configured, a region can just be points in space, with no relation to the image within that space. And because a region is the child of a Win32 element, then if the parent exists, the 'image-less' region will always be found.

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

Hi Shashank, 

We have very recently for the first time had the opportunity to experiment with the SalesForce API with promising results. However within my company it might take a while before we get acces to the API in our build- and production environments. My current project can't wait on this API sadly. Using the API would solve all my problems to be sure!

Thank you for your reply.

------------------------------
Thomas Warnaar
------------------------------

Hi John,

Thank your for your reply.

The region type is image, not coordinates. I guess this is the right type? I have to note that I do use other region spied elements within this web page which do work correctly, and also do not always sit in exactly the same location on the web page so the bot actually does find the correct region in these cases.

------------------------------
Thomas Warnaar
------------------------------

Hmm, yes that's the right type. If it can work occasionally, perhaps the tolerance area is OK for some circumstances but not others?

------------------------------
John Carter
Professional Services
Blue Prism
------------------------------

This particular button is always in the same location on the x-axis but can be translated along the y-axis because of page content differences and different scroll distances. I covered the entire y-axis range with the search padding and some margin on the x-axis. 

But my understanding is correct that the region should only be found if it is visible on screen right? So even if it does exist but is invisible an image based region spy should not be triggered? Because in that case I just don't understand how this happens.

------------------------------
Thomas Warnaar
------------------------------

Yes your understanding is correct, surface automation should be WYSIWYG. Obviously it's hard for me to diagnose from here, but here are a few more 'sanity' checks to try. Apologies if they seem dumb!

  • In the wait stage, check it's definitely the region and not the parent Win32 element being used for the check exists condition.
  • Check it's the right region element in the wait stage and not some other with the same name
  • Add a navigate stage to execute the verify action with the highlight input set to True. This should show you where the app modeller thinks the region is at run time.
  • Verify/highlight the parent Win32 element at runtime.


------------------------------
John Carter
Professional Services
Blue Prism
------------------------------