4

I'm new to SalesForce and trying to use Selenium to test a page. When I check the "innerHTML" of a certain div (as selenium sees it), I see the following:

<div class="test-id" data-aura-rendered-by="34:1617;a">
  <span class="test-id__field-label slds-form-element__label" data-aura-rendered-by="35:1617;a">Preferred Name</span>
</div>
<div class="slds-form-element__control slds-grid itemBody" data-aura-rendered-by="37:1617;a">
    <span class="test-id__field-value slds-form-element__static slds-grow" data-aura-rendered-by="38:1617;a">
       <span data-aura-rendered-by="30:1617;a" class="uiOutputText" data-aura-class="uiOutputText"></span>
    </span>
    <!--render facet: 40:1617;a-->
    <!--render facet: 41:1617;a-->
</div>

My problem is that there's actually a button inside the "render facet" areas. Below is what I see in the Chrome Developer view (I want to get at the button).

<div class="test-id" data-aura-rendered-by="34:1617;a">
  <span class="test-id__field-label slds-form-element__label" data-aura-rendered-by="35:1617;a">Preferred Name</span>
</div>
<div class="slds-form-element__control slds-grid itemBody" data-aura-rendered-by="37:1617;a">
    <span class="test-id__field-value slds-form-element__static slds-grow" data-aura-rendered-by="38:1617;a">
       <span data-aura-rendered-by="30:1617;a" class="uiOutputText" data-aura-class="uiOutputText"></span>
    </span>
    <!--render facet: 40:1617;a-->
    <button class="slds-button test-id__inline-edit-trigger slds-button_icon slds-button_icon-small slds-shrink-none inline-edit-trigger slds-button--icon-container" type="button" title="Edit Preferred Name" data-aura-rendered-by="3404:0">
        <span data-aura-rendered-by="3407:0">
            <svg class="slds-button__icon " focusable="false" data-key="edit" aria-hidden="true">
                <use xmlns:xlink="http://www.w3.org/1999/xlink" xlink:href="/_slds/icons/v7.18.0/utility-sprite/svg/symbols.svg#edit"></use>
            </svg>
        </span>
        <!--render facet: 3408:0-->
    </button>
    <!--render facet: 41:1617;a-->
</div>

How can I make Selenium see that button? I've tried a lot of things (that I can state here if necessary) but I think this shows what my problem is. Thanks for any help.

  • Did you figure out how to do this? I'm currently trying to navigate to the pop up LEX gives you when creating a new record. Do you know how to do that? – Jake Friedman Aug 16 '17 at 19:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.