How do UIPath selectors work when there is no specific ID











up vote
1
down vote

favorite












I am trying to create a UIPath project to automate filling out a simple form in Microsoft Dynamics Web Client 2016. I have been running into problems with strange behavior due to what I believe to be unreliable selectors. The Dynamics web client is written with Angular and seems to be a single page application. None of the inputs have any type of ID or specific data-attribute that UIPath can use as a selector as far as I can tell. It looks like the program is using the DOM tree to count the number of nested divs in order to assign each input with a "parentId" attribute. This seems to cause unreliable behavior when there are popup windows and I am worried that going forward with an automation with this particular web application will not be scalable.



Example of a selector:



<html title="Microsoft Dynamics GP" />
<webctrl parentid='a000000000000000056800083584c00030100000000f1550000000000'
tag='INPUT' />


Where are this selector and parentId attribute coming from and will it be reliable and scalable through updates and form changes?



Example of selector










share|improve this question


























    up vote
    1
    down vote

    favorite












    I am trying to create a UIPath project to automate filling out a simple form in Microsoft Dynamics Web Client 2016. I have been running into problems with strange behavior due to what I believe to be unreliable selectors. The Dynamics web client is written with Angular and seems to be a single page application. None of the inputs have any type of ID or specific data-attribute that UIPath can use as a selector as far as I can tell. It looks like the program is using the DOM tree to count the number of nested divs in order to assign each input with a "parentId" attribute. This seems to cause unreliable behavior when there are popup windows and I am worried that going forward with an automation with this particular web application will not be scalable.



    Example of a selector:



    <html title="Microsoft Dynamics GP" />
    <webctrl parentid='a000000000000000056800083584c00030100000000f1550000000000'
    tag='INPUT' />


    Where are this selector and parentId attribute coming from and will it be reliable and scalable through updates and form changes?



    Example of selector










    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I am trying to create a UIPath project to automate filling out a simple form in Microsoft Dynamics Web Client 2016. I have been running into problems with strange behavior due to what I believe to be unreliable selectors. The Dynamics web client is written with Angular and seems to be a single page application. None of the inputs have any type of ID or specific data-attribute that UIPath can use as a selector as far as I can tell. It looks like the program is using the DOM tree to count the number of nested divs in order to assign each input with a "parentId" attribute. This seems to cause unreliable behavior when there are popup windows and I am worried that going forward with an automation with this particular web application will not be scalable.



      Example of a selector:



      <html title="Microsoft Dynamics GP" />
      <webctrl parentid='a000000000000000056800083584c00030100000000f1550000000000'
      tag='INPUT' />


      Where are this selector and parentId attribute coming from and will it be reliable and scalable through updates and form changes?



      Example of selector










      share|improve this question













      I am trying to create a UIPath project to automate filling out a simple form in Microsoft Dynamics Web Client 2016. I have been running into problems with strange behavior due to what I believe to be unreliable selectors. The Dynamics web client is written with Angular and seems to be a single page application. None of the inputs have any type of ID or specific data-attribute that UIPath can use as a selector as far as I can tell. It looks like the program is using the DOM tree to count the number of nested divs in order to assign each input with a "parentId" attribute. This seems to cause unreliable behavior when there are popup windows and I am worried that going forward with an automation with this particular web application will not be scalable.



      Example of a selector:



      <html title="Microsoft Dynamics GP" />
      <webctrl parentid='a000000000000000056800083584c00030100000000f1550000000000'
      tag='INPUT' />


      Where are this selector and parentId attribute coming from and will it be reliable and scalable through updates and form changes?



      Example of selector







      uipath






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 19 at 15:52









      MUlferts

      6371719




      6371719
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote



          accepted










          If the element itself can't be found reliably, just work around the issue by using an anchor on an element that can. For example, the input elements on http://www.rpachallenge.com/ can never be found reliably as their id changes every few minutes. So, if you need to type text into the field for "Company Name", we need to work with anchors - in our case there will always be a label with a distinctive text.



          relative selector with anchor



          You will need to use an Anchor Base along with a Find Element activity (plus the desired action). Here's the selector for the anchor - using the element's descriptive text:



          <webctrl aaname='Company Name' tag='LABEL' />


          Then, the Type Into activity just refers to an Input element:



          <webctrl tag='INPUT' />


          The only thing to keep in mind are multiple languages in which case you will need to either consider them in the selector, or select the element by id, if applicable.






          share|improve this answer





















          • The only problem is that this application does not even have label text available. It is all buried in Angular javascript objects. None of it is accessible in HTML, so the RPA challenge example does not work without settling with Citrix/image-based automation. I will accept your answer as it seems like the best answer that UIPath can offer, but it still does not create a rock solid automation in this particular Angular app, in my opinion. It really feels like if the selectors are no good, using UI automation is like building a house of cards that will eventually fail after any updates.
            – MUlferts
            Nov 21 at 20:14












          • Judging from the first screenshot, some elements seem to have ids (e.g. gpContentArea). I agree that finding reliable selectors is the main challenge, and I am wondering if you could provide the whole (relevant) HTML as an example. Note that UiPath inserts alters the HTML by inserting attributes, so saving the page as HTML in your browser would do just fine. I will gladly have another look.
            – Wolfgang Radl
            Nov 21 at 20:34










          • That id is the wrapper for the entire page, nothing inside of the form has any sort of identifiable IDs or data-attributes. We have already scoured the UI Explorer and spoke with a UIPath engineer about the issue. The automation is working right now, I am just concerned that it will need to be tweaked if future updates include any UI changes. I am just a bit cynical about UI automation when the selectors are no good. It seems like Angular best practices should include adding IDs to inputs, even if Angular doesn't need them, in order to support stuff like UI automation.
            – MUlferts
            Nov 21 at 20:49











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














           

          draft saved


          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53378290%2fhow-do-uipath-selectors-work-when-there-is-no-specific-id%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote



          accepted










          If the element itself can't be found reliably, just work around the issue by using an anchor on an element that can. For example, the input elements on http://www.rpachallenge.com/ can never be found reliably as their id changes every few minutes. So, if you need to type text into the field for "Company Name", we need to work with anchors - in our case there will always be a label with a distinctive text.



          relative selector with anchor



          You will need to use an Anchor Base along with a Find Element activity (plus the desired action). Here's the selector for the anchor - using the element's descriptive text:



          <webctrl aaname='Company Name' tag='LABEL' />


          Then, the Type Into activity just refers to an Input element:



          <webctrl tag='INPUT' />


          The only thing to keep in mind are multiple languages in which case you will need to either consider them in the selector, or select the element by id, if applicable.






          share|improve this answer





















          • The only problem is that this application does not even have label text available. It is all buried in Angular javascript objects. None of it is accessible in HTML, so the RPA challenge example does not work without settling with Citrix/image-based automation. I will accept your answer as it seems like the best answer that UIPath can offer, but it still does not create a rock solid automation in this particular Angular app, in my opinion. It really feels like if the selectors are no good, using UI automation is like building a house of cards that will eventually fail after any updates.
            – MUlferts
            Nov 21 at 20:14












          • Judging from the first screenshot, some elements seem to have ids (e.g. gpContentArea). I agree that finding reliable selectors is the main challenge, and I am wondering if you could provide the whole (relevant) HTML as an example. Note that UiPath inserts alters the HTML by inserting attributes, so saving the page as HTML in your browser would do just fine. I will gladly have another look.
            – Wolfgang Radl
            Nov 21 at 20:34










          • That id is the wrapper for the entire page, nothing inside of the form has any sort of identifiable IDs or data-attributes. We have already scoured the UI Explorer and spoke with a UIPath engineer about the issue. The automation is working right now, I am just concerned that it will need to be tweaked if future updates include any UI changes. I am just a bit cynical about UI automation when the selectors are no good. It seems like Angular best practices should include adding IDs to inputs, even if Angular doesn't need them, in order to support stuff like UI automation.
            – MUlferts
            Nov 21 at 20:49















          up vote
          1
          down vote



          accepted










          If the element itself can't be found reliably, just work around the issue by using an anchor on an element that can. For example, the input elements on http://www.rpachallenge.com/ can never be found reliably as their id changes every few minutes. So, if you need to type text into the field for "Company Name", we need to work with anchors - in our case there will always be a label with a distinctive text.



          relative selector with anchor



          You will need to use an Anchor Base along with a Find Element activity (plus the desired action). Here's the selector for the anchor - using the element's descriptive text:



          <webctrl aaname='Company Name' tag='LABEL' />


          Then, the Type Into activity just refers to an Input element:



          <webctrl tag='INPUT' />


          The only thing to keep in mind are multiple languages in which case you will need to either consider them in the selector, or select the element by id, if applicable.






          share|improve this answer





















          • The only problem is that this application does not even have label text available. It is all buried in Angular javascript objects. None of it is accessible in HTML, so the RPA challenge example does not work without settling with Citrix/image-based automation. I will accept your answer as it seems like the best answer that UIPath can offer, but it still does not create a rock solid automation in this particular Angular app, in my opinion. It really feels like if the selectors are no good, using UI automation is like building a house of cards that will eventually fail after any updates.
            – MUlferts
            Nov 21 at 20:14












          • Judging from the first screenshot, some elements seem to have ids (e.g. gpContentArea). I agree that finding reliable selectors is the main challenge, and I am wondering if you could provide the whole (relevant) HTML as an example. Note that UiPath inserts alters the HTML by inserting attributes, so saving the page as HTML in your browser would do just fine. I will gladly have another look.
            – Wolfgang Radl
            Nov 21 at 20:34










          • That id is the wrapper for the entire page, nothing inside of the form has any sort of identifiable IDs or data-attributes. We have already scoured the UI Explorer and spoke with a UIPath engineer about the issue. The automation is working right now, I am just concerned that it will need to be tweaked if future updates include any UI changes. I am just a bit cynical about UI automation when the selectors are no good. It seems like Angular best practices should include adding IDs to inputs, even if Angular doesn't need them, in order to support stuff like UI automation.
            – MUlferts
            Nov 21 at 20:49













          up vote
          1
          down vote



          accepted







          up vote
          1
          down vote



          accepted






          If the element itself can't be found reliably, just work around the issue by using an anchor on an element that can. For example, the input elements on http://www.rpachallenge.com/ can never be found reliably as their id changes every few minutes. So, if you need to type text into the field for "Company Name", we need to work with anchors - in our case there will always be a label with a distinctive text.



          relative selector with anchor



          You will need to use an Anchor Base along with a Find Element activity (plus the desired action). Here's the selector for the anchor - using the element's descriptive text:



          <webctrl aaname='Company Name' tag='LABEL' />


          Then, the Type Into activity just refers to an Input element:



          <webctrl tag='INPUT' />


          The only thing to keep in mind are multiple languages in which case you will need to either consider them in the selector, or select the element by id, if applicable.






          share|improve this answer












          If the element itself can't be found reliably, just work around the issue by using an anchor on an element that can. For example, the input elements on http://www.rpachallenge.com/ can never be found reliably as their id changes every few minutes. So, if you need to type text into the field for "Company Name", we need to work with anchors - in our case there will always be a label with a distinctive text.



          relative selector with anchor



          You will need to use an Anchor Base along with a Find Element activity (plus the desired action). Here's the selector for the anchor - using the element's descriptive text:



          <webctrl aaname='Company Name' tag='LABEL' />


          Then, the Type Into activity just refers to an Input element:



          <webctrl tag='INPUT' />


          The only thing to keep in mind are multiple languages in which case you will need to either consider them in the selector, or select the element by id, if applicable.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 21 at 19:54









          Wolfgang Radl

          678513




          678513












          • The only problem is that this application does not even have label text available. It is all buried in Angular javascript objects. None of it is accessible in HTML, so the RPA challenge example does not work without settling with Citrix/image-based automation. I will accept your answer as it seems like the best answer that UIPath can offer, but it still does not create a rock solid automation in this particular Angular app, in my opinion. It really feels like if the selectors are no good, using UI automation is like building a house of cards that will eventually fail after any updates.
            – MUlferts
            Nov 21 at 20:14












          • Judging from the first screenshot, some elements seem to have ids (e.g. gpContentArea). I agree that finding reliable selectors is the main challenge, and I am wondering if you could provide the whole (relevant) HTML as an example. Note that UiPath inserts alters the HTML by inserting attributes, so saving the page as HTML in your browser would do just fine. I will gladly have another look.
            – Wolfgang Radl
            Nov 21 at 20:34










          • That id is the wrapper for the entire page, nothing inside of the form has any sort of identifiable IDs or data-attributes. We have already scoured the UI Explorer and spoke with a UIPath engineer about the issue. The automation is working right now, I am just concerned that it will need to be tweaked if future updates include any UI changes. I am just a bit cynical about UI automation when the selectors are no good. It seems like Angular best practices should include adding IDs to inputs, even if Angular doesn't need them, in order to support stuff like UI automation.
            – MUlferts
            Nov 21 at 20:49


















          • The only problem is that this application does not even have label text available. It is all buried in Angular javascript objects. None of it is accessible in HTML, so the RPA challenge example does not work without settling with Citrix/image-based automation. I will accept your answer as it seems like the best answer that UIPath can offer, but it still does not create a rock solid automation in this particular Angular app, in my opinion. It really feels like if the selectors are no good, using UI automation is like building a house of cards that will eventually fail after any updates.
            – MUlferts
            Nov 21 at 20:14












          • Judging from the first screenshot, some elements seem to have ids (e.g. gpContentArea). I agree that finding reliable selectors is the main challenge, and I am wondering if you could provide the whole (relevant) HTML as an example. Note that UiPath inserts alters the HTML by inserting attributes, so saving the page as HTML in your browser would do just fine. I will gladly have another look.
            – Wolfgang Radl
            Nov 21 at 20:34










          • That id is the wrapper for the entire page, nothing inside of the form has any sort of identifiable IDs or data-attributes. We have already scoured the UI Explorer and spoke with a UIPath engineer about the issue. The automation is working right now, I am just concerned that it will need to be tweaked if future updates include any UI changes. I am just a bit cynical about UI automation when the selectors are no good. It seems like Angular best practices should include adding IDs to inputs, even if Angular doesn't need them, in order to support stuff like UI automation.
            – MUlferts
            Nov 21 at 20:49
















          The only problem is that this application does not even have label text available. It is all buried in Angular javascript objects. None of it is accessible in HTML, so the RPA challenge example does not work without settling with Citrix/image-based automation. I will accept your answer as it seems like the best answer that UIPath can offer, but it still does not create a rock solid automation in this particular Angular app, in my opinion. It really feels like if the selectors are no good, using UI automation is like building a house of cards that will eventually fail after any updates.
          – MUlferts
          Nov 21 at 20:14






          The only problem is that this application does not even have label text available. It is all buried in Angular javascript objects. None of it is accessible in HTML, so the RPA challenge example does not work without settling with Citrix/image-based automation. I will accept your answer as it seems like the best answer that UIPath can offer, but it still does not create a rock solid automation in this particular Angular app, in my opinion. It really feels like if the selectors are no good, using UI automation is like building a house of cards that will eventually fail after any updates.
          – MUlferts
          Nov 21 at 20:14














          Judging from the first screenshot, some elements seem to have ids (e.g. gpContentArea). I agree that finding reliable selectors is the main challenge, and I am wondering if you could provide the whole (relevant) HTML as an example. Note that UiPath inserts alters the HTML by inserting attributes, so saving the page as HTML in your browser would do just fine. I will gladly have another look.
          – Wolfgang Radl
          Nov 21 at 20:34




          Judging from the first screenshot, some elements seem to have ids (e.g. gpContentArea). I agree that finding reliable selectors is the main challenge, and I am wondering if you could provide the whole (relevant) HTML as an example. Note that UiPath inserts alters the HTML by inserting attributes, so saving the page as HTML in your browser would do just fine. I will gladly have another look.
          – Wolfgang Radl
          Nov 21 at 20:34












          That id is the wrapper for the entire page, nothing inside of the form has any sort of identifiable IDs or data-attributes. We have already scoured the UI Explorer and spoke with a UIPath engineer about the issue. The automation is working right now, I am just concerned that it will need to be tweaked if future updates include any UI changes. I am just a bit cynical about UI automation when the selectors are no good. It seems like Angular best practices should include adding IDs to inputs, even if Angular doesn't need them, in order to support stuff like UI automation.
          – MUlferts
          Nov 21 at 20:49




          That id is the wrapper for the entire page, nothing inside of the form has any sort of identifiable IDs or data-attributes. We have already scoured the UI Explorer and spoke with a UIPath engineer about the issue. The automation is working right now, I am just concerned that it will need to be tweaked if future updates include any UI changes. I am just a bit cynical about UI automation when the selectors are no good. It seems like Angular best practices should include adding IDs to inputs, even if Angular doesn't need them, in order to support stuff like UI automation.
          – MUlferts
          Nov 21 at 20:49


















           

          draft saved


          draft discarded



















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53378290%2fhow-do-uipath-selectors-work-when-there-is-no-specific-id%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Wiesbaden

          Marschland

          Dieringhausen