<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic RE: Salesforce Web/UI Automation in Product Forum</title>
    <link>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59376#M13039</link>
    <description>Hi Sam,&lt;BR /&gt;&lt;BR /&gt;First I want to echo my colleague Sam's reply and advise you to try to reconsider the API. I have some suggestions below, but the processing time will take longer. &lt;BR /&gt;I just had a similar problem on a different web application, and here is what worked for me:&lt;BR /&gt;&lt;BR /&gt;Look up the tree structure of the HTML from the target element. There is usually a nearby element that you are able to match on unique attribute(s), often Web text in combination with one or two others. Let's call this the label element. Compare the Web path of this label element with the Web path of the target element. If one element is dependent on the other, there will be a pattern. &lt;BR /&gt;&lt;BR /&gt;When the page loads, you can read the path of the label element and use it to calculate the path of the target element based on the pattern you observed. Use the new path to dynamically match on the target element (Test to make sure the pattern is correct and consistent). Here is a mockup of what that could look like:
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17174.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17329iA4CCEC459412ED1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="17174.jpg" alt="17174.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;Another suggestion is to take a closer look at the URL structure. What looks like a random string can sometimes be a unique/persistent identifier that can be useful. Part of your Salesforce URL is probably the unique ID for that record, for example.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Patrick Aucoin&lt;BR /&gt;Senior Product Consultant&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
    <pubDate>Tue, 22 Sep 2020 20:24:00 GMT</pubDate>
    <dc:creator>PatrickAucoin</dc:creator>
    <dc:date>2020-09-22T20:24:00Z</dc:date>
    <item>
      <title>Salesforce Web/UI Automation</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59374#M13037</link>
      <description>Hi Blue Prism Community!&lt;BR /&gt;&lt;BR /&gt;I just wanted to run this by you guys in hopes that at least some of you have run by this problem before:&lt;BR /&gt;&lt;BR /&gt;I'm working on a project that requires us to automate a lengthy task in &lt;STRONG&gt;&lt;SPAN style="color: #00ccff;"&gt;Salesforce&lt;/SPAN&gt;&lt;/STRONG&gt;. Now, I know that the Digital Exchange has the awesome &lt;STRONG&gt;Salesforce Skill&amp;nbsp;&lt;/STRONG&gt;but a strict constraint in this project is to not use the API. However, the fields in Salesforce records on the web client do not have any identifying attributes. &lt;BR /&gt;&lt;BR /&gt;Using Web Path has not been helpful since it varies from record to record and using wildcards in Web Paths on a complex site makes the robot very slow as it traverses all possibilities.&lt;BR /&gt;&lt;BR /&gt;Has anyone had any luck with Salesforce and is willing to share some knowledge?&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sam Assaf&lt;BR /&gt;Senior&lt;BR /&gt;EY&lt;BR /&gt;Montreal QC&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Sat, 19 Sep 2020 00:06:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59374#M13037</guid>
      <dc:creator>SamAssaf</dc:creator>
      <dc:date>2020-09-19T00:06:00Z</dc:date>
    </item>
    <item>
      <title>RE: Salesforce Web/UI Automation</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59375#M13038</link>
      <description>&lt;P&gt;I've never tried using the UI for Salesforce, but I've heard it is quite a nightmare to spy. I swear by the API as it's lightning fast (and maybe because I had quite a bit to do with creating it....)&lt;/P&gt;
&lt;P&gt;I would challenge the constraint to not use the API, a big factor you could use in doing so is cost. The API takes miliseconds to do a task that could take minutes in the UI. Multiply that out by any decent number of cases and you're looking at huge savings on resource/licence utilisation by going for the faster option. Any senior person putting a blocker on the API may reconsider when shown such numbers.&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sam Stone &lt;BR /&gt;CoE Build Lead&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Sep 2020 10:45:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59375#M13038</guid>
      <dc:creator>SamStone</dc:creator>
      <dc:date>2020-09-22T10:45:00Z</dc:date>
    </item>
    <item>
      <title>RE: Salesforce Web/UI Automation</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59376#M13039</link>
      <description>Hi Sam,&lt;BR /&gt;&lt;BR /&gt;First I want to echo my colleague Sam's reply and advise you to try to reconsider the API. I have some suggestions below, but the processing time will take longer. &lt;BR /&gt;I just had a similar problem on a different web application, and here is what worked for me:&lt;BR /&gt;&lt;BR /&gt;Look up the tree structure of the HTML from the target element. There is usually a nearby element that you are able to match on unique attribute(s), often Web text in combination with one or two others. Let's call this the label element. Compare the Web path of this label element with the Web path of the target element. If one element is dependent on the other, there will be a pattern. &lt;BR /&gt;&lt;BR /&gt;When the page loads, you can read the path of the label element and use it to calculate the path of the target element based on the pattern you observed. Use the new path to dynamically match on the target element (Test to make sure the pattern is correct and consistent). Here is a mockup of what that could look like:
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;
&lt;DIV class="media" style="overflow: hidden; zoom: 1;"&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17174.jpg"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17329iA4CCEC459412ED1A/image-size/large?v=v2&amp;amp;px=999" role="button" title="17174.jpg" alt="17174.jpg" /&gt;&lt;/span&gt;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;BR /&gt;&lt;BR /&gt;Another suggestion is to take a closer look at the URL structure. What looks like a random string can sometimes be a unique/persistent identifier that can be useful. Part of your Salesforce URL is probably the unique ID for that record, for example.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Patrick Aucoin&lt;BR /&gt;Senior Product Consultant&lt;BR /&gt;Blue Prism&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Sep 2020 20:24:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59376#M13039</guid>
      <dc:creator>PatrickAucoin</dc:creator>
      <dc:date>2020-09-22T20:24:00Z</dc:date>
    </item>
    <item>
      <title>RE: Salesforce Web/UI Automation</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59377#M13040</link>
      <description>We tried to work with salesforce UI. The end result was a monster of a bot and it ended up being scrapped because salesforce ui is too dynamic.&lt;BR /&gt;&lt;BR /&gt;We contacted the salesforce team and got an API access, now we do everything through the api. It's simpler than automating the UI and a rock stable.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Brian Christensen&lt;BR /&gt;Developer&lt;BR /&gt;TDC&lt;BR /&gt;Europe/Copenhagen&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2020 05:30:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59377#M13040</guid>
      <dc:creator>BrianChristense</dc:creator>
      <dc:date>2020-09-23T05:30:00Z</dc:date>
    </item>
    <item>
      <title>RE: Salesforce Web/UI Automation</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59378#M13041</link>
      <description>Thank you! Your answer echoes &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/56098"&gt;@SamStone&lt;/a&gt;'s and is unfortunately what I was afraid of. The client insists that there are too many hurdles associated with exposing the API. &lt;BR /&gt;&lt;BR /&gt;I have tried &lt;a href="https://community.blueprism.com/t5/user/viewprofilepage/user-id/453"&gt;@PatrickAucoin&lt;/a&gt;'s solution but the problem is twofold:&lt;BR /&gt;
&lt;OL&gt;
&lt;LI&gt;The UI is so dynamic that even spying "labels" requires wildcards in the web path and that just hangs Blue Prism.&lt;/LI&gt;
&lt;LI&gt;The amount of Web Path manipulation you'd have to do at the end to traverse from the "label" to the actual field is quite complex.&lt;/LI&gt;
&lt;/OL&gt;
​​&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Sam Assaf&lt;BR /&gt;Senior&lt;BR /&gt;EY&lt;BR /&gt;Montreal QC&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2020 14:44:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59378#M13041</guid>
      <dc:creator>SamAssaf</dc:creator>
      <dc:date>2020-09-23T14:44:00Z</dc:date>
    </item>
    <item>
      <title>RE: Salesforce Web/UI Automation</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59379#M13042</link>
      <description>Hello Sam, while I understand the client might insist on the hurdles... I believe it will be crucial to educate the client on the risk vs reward factors as stated earlier... &lt;BR /&gt;At the end of the day, the true value in the automation and overall solution is what should prevail,&amp;nbsp; If it doesn't... then we have all failed our customer(s) and ourselves.&amp;nbsp; &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Pino Agostino&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Thu, 24 Sep 2020 01:05:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59379#M13042</guid>
      <dc:creator>pino.agostino</dc:creator>
      <dc:date>2020-09-24T01:05:00Z</dc:date>
    </item>
    <item>
      <title>RE: Salesforce Web/UI Automation</title>
      <link>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59380#M13043</link>
      <description>Hi &lt;A class="user-content-mention" data-sign="@" data-contactkey="f2e1cbb8-4d9a-41b9-bfa3-f46f0f4f61e4" data-tag-text="@Sam Assaf" href="https://community.blueprism.com/network/profile?UserKey=f2e1cbb8-4d9a-41b9-bfa3-f46f0f4f61e4" data-itemmentionkey="d8c836a9-ddba-48df-ab5b-54c6cc6d7cf6"&gt;@Sam Assaf&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;I realise your post was quite a while ago, but perhaps you or others will get value from this in the future.&lt;BR /&gt;&lt;BR /&gt;I completely agree that the API approach is the way to go, but in the event that the real world intervenes and ​you're forced to use traditional spying, this is what worked for me.&amp;nbsp;BTW, I'm using the Lightning interface - I guess you are too - so I've no idea if this works for SF Classic too.&lt;BR /&gt;&lt;BR /&gt;It seems that issue with Lightning is that every time you click on a different object (eg: from Account #1 to Account #2 to Account #3) it appends the new view to the original DOM. Presumably, this is so that it can quickly navigate back-and-forth between the various objects that you've selected. ​​​For BP robots though, it means that the field you're trying to spy/retrieve is never at the same path in the DOM. Nightmare!&lt;BR /&gt;&lt;BR /&gt;You can see this from the screenshot below. This is the XPATH to the same field in three different accounts. The only difference is line 14.&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17181.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17343i8DD52124598C4162/image-size/large?v=v2&amp;amp;px=999" role="button" title="17181.png" alt="17181.png" /&gt;&lt;/span&gt;&lt;BR /&gt;Hence we end up creating dynamic paths, looking up parent URLs, modifying that offending &amp;lt;DIV&amp;gt;, and stuff like that which becomes completely unwieldy.&lt;BR /&gt;&lt;BR /&gt;​The solution that's worked for me is to refresh the browser each time you go to a new SF screen. The browser refresh resets the DOM and therefore the Line 14 DIV is always #1 and the XPATH to the field is always consistent.&lt;BR /&gt;&lt;BR /&gt;So, at design-time, I goto a page, I refresh the page, I spy the page controls; at run-time, I goto a page, I refresh the page, I read the page controls. Something like this:&lt;BR /&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="17182.png"&gt;&lt;img src="https://community.blueprism.com/t5/image/serverpage/image-id/17338i695ACDDE0194712D/image-size/large?v=v2&amp;amp;px=999" role="button" title="17182.png" alt="17182.png" /&gt;&lt;/span&gt;&lt;BR /&gt;I'm only writing my objects now (I discovered this thread 'cause I was tearing my hair out) so perhaps some other problem will crop up, but thus far this approach is working for me.&lt;BR /&gt;&lt;BR /&gt;------------------------------&lt;BR /&gt;Dan Ternes&lt;BR /&gt;CTO APJ&lt;BR /&gt;Blue Prism&lt;BR /&gt;Asia/Hong_Kong&lt;BR /&gt;------------------------------&lt;BR /&gt;</description>
      <pubDate>Wed, 27 Jan 2021 08:50:00 GMT</pubDate>
      <guid>https://community.blueprism.com/t5/Product-Forum/Salesforce-Web-UI-Automation/m-p/59380#M13043</guid>
      <dc:creator>dcternes</dc:creator>
      <dc:date>2021-01-27T08:50:00Z</dc:date>
    </item>
  </channel>
</rss>

