Skip to main content
Tweeted twitter.com/StackSalesforce/status/906916272796991489
fix tags
Link
Dave Humm
  • 5.1k
  • 5
  • 25
  • 38
added 43 characters in body
Source Link
Himanshu
  • 10.5k
  • 5
  • 20
  • 33

I am trying to automate Salesforce lightning using Selenium, but getting issues with identifying elements. Reason, its having dynamic IDs , and other attributes are either very long , or they are not unique.

For eg , /a id="170:1968;a" class="textUnderline outputLookupLink slds-truncate forceOutputLookup" data-refid="recordId" data-recordid="0059E000001aOCSQA2" data-special-link="true" href="#/sObject/0059E000001aOCSQA2/view" target="_blank" rel="noreferrer" title="" data-aura-rendered-by="170:1968;a" data-aura-class="forceOutputLookup"/

<a id="170:1968;a" class="textUnderline outputLookupLink slds-truncate forceOutputLookup" 
data-refid="recordId" 
data-recordid="0059E000001aOCSQA2" 
data-special-link="true" 
href="#/sObject/0059E000001aOCSQA2/view" 
target="_blank" rel="noreferrer" 
title="" data-aura-rendered-by="170:1968;a" data-aura-class="forceOutputLookup"/>

In above code , ID is dynamic , Class is not unique, and all the Lookup elements are associated with it. Also the absolute path is not much trusted , and hence I am trying to find any concrete option to handle these elements. Any help will be highly appreciated.

I am trying to automate Salesforce lightning using Selenium, but getting issues with identifying elements. Reason, its having dynamic IDs , and other attributes are either very long , or they are not unique.

For eg , /a id="170:1968;a" class="textUnderline outputLookupLink slds-truncate forceOutputLookup" data-refid="recordId" data-recordid="0059E000001aOCSQA2" data-special-link="true" href="#/sObject/0059E000001aOCSQA2/view" target="_blank" rel="noreferrer" title="" data-aura-rendered-by="170:1968;a" data-aura-class="forceOutputLookup"/

In above code , ID is dynamic , Class is not unique, and all the Lookup elements are associated with it. Also the absolute path is not much trusted , and hence I am trying to find any concrete option to handle these elements. Any help will be highly appreciated.

I am trying to automate Salesforce lightning using Selenium, but getting issues with identifying elements. Reason, its having dynamic IDs , and other attributes are either very long , or they are not unique.

For eg ,

<a id="170:1968;a" class="textUnderline outputLookupLink slds-truncate forceOutputLookup" 
data-refid="recordId" 
data-recordid="0059E000001aOCSQA2" 
data-special-link="true" 
href="#/sObject/0059E000001aOCSQA2/view" 
target="_blank" rel="noreferrer" 
title="" data-aura-rendered-by="170:1968;a" data-aura-class="forceOutputLookup"/>

In above code , ID is dynamic , Class is not unique, and all the Lookup elements are associated with it. Also the absolute path is not much trusted , and hence I am trying to find any concrete option to handle these elements. Any help will be highly appreciated.

Source Link

How to Identify Elements in Salesforce Lightning for Selenium

I am trying to automate Salesforce lightning using Selenium, but getting issues with identifying elements. Reason, its having dynamic IDs , and other attributes are either very long , or they are not unique.

For eg , /a id="170:1968;a" class="textUnderline outputLookupLink slds-truncate forceOutputLookup" data-refid="recordId" data-recordid="0059E000001aOCSQA2" data-special-link="true" href="#/sObject/0059E000001aOCSQA2/view" target="_blank" rel="noreferrer" title="" data-aura-rendered-by="170:1968;a" data-aura-class="forceOutputLookup"/

In above code , ID is dynamic , Class is not unique, and all the Lookup elements are associated with it. Also the absolute path is not much trusted , and hence I am trying to find any concrete option to handle these elements. Any help will be highly appreciated.