cancel
Showing results for 
Search instead for 
Did you mean: 

BP Spying using CSS selector and Xpath - New possibilities?

PvD_SE
Level 12

Hi,

I am working my way through course 'BP Spying using CSS selector and Xpath'. In Part 2, a slide pops up, showing amongst others the text below :

31922.png
At 20:30 in the vid, the above text is commented as a manner to could build a two-column table that would generate into a ready object. The table columns would be 'Element name' and corresponding 'CSS Selector or Xpath'. Unfortunately, this is not demoed in the vid. While it is currently beyond me how this would work, it sure sounds like a very interesting subject to explore. 

Could anyone describe how this would work in an understandable manner? Perhaps @Bruce Liu could enlighten me?



------------------------------
Happy coding!
---------------
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)
2 REPLIES 2

bruce.liu
Staff
Staff
Hi Paul,

The idea was simple, but would require some efforts to put a solution together.

In the most simplistic form, you can create a spreadsheet with seveal columns, Element Name, CSS and XPath, make sure you only fill either CSS or XPath in the spreadsheet. If you want to specify element hierarchy you can use additional columns to support such definition. Then we can go about creating a basic browser object XML definition with elements defined using the values you have provided by some clever spreadsheet logic, using macro or otherwise. Such object contains basic App Modeller level info, which you can hard code (browser path and etc), object name may just come from the worksheet name. For elements, since we only need element name and CSS/XPath to successfully spy an element, you can essentially create an element that is immediately spyable by only filling corresponding values using either Web CSS or Web Path/XPath attribute in the element attribute table and have it set to Match, while leaving values of all other attribute as empty and not to match. Element Type can be preset to Web Element, but you can also add another dropdown column to make user specify it in the spreadsheet. As this process can take place entirely outside of Blue Prism, and can potentially be completed as part of the ODI work, it can save you a lot of time in spying a web application during development.

Hope the above is clear.

------------------------------
Bruce Liu
Senior Product Consultant, Professional Services
Blue Prism
Australia/Sydney
------------------------------

Hi Bruce,

Thanks for the explanation. It's a bit clearer and still quite interesting.

------------------------------
Happy coding!
---------------
Paul
Sweden
------------------------------
Happy coding!
Paul, Sweden
(By all means, do not mark this as the best answer!)