Forum Discussion

gdave's avatar
gdave
Regular Contributor
4 years ago

Inner HTML

Hi all I was wondering if any of you can help me with this.   <div data-v-2b025292="" class="u-p-md u-flex u-flex-col u-items-start u-font-h3"><span data-v-2b025292="">Dashboard Widgets</span> <di...
  • AlexKaras's avatar
    4 years ago

    Hi,

     

    Basically, as it was advised by BenoitB.

    Actual markup for the pencil:

    <span data-v-2b025292="" aria-hidden="true" class="silk-icon tol-view-edit-panel__edit-button u-flex u-items-center u-px-md u-cursor-pointer fa-pencil fas silk-icon--large"></span>

    So this is just empty span element with custom-drawn pencil via the class specification.

    Empty span is not included in the Objects tree in TC as documented here: https://support.smartbear.com/testcomplete/docs/app-testing/web/general/object-identification/tree-model-elements.html

    So you have three options:

    -- Talk to your developers and ask them to change page markup so that the required element is included into Objects tree in TC; or

    -- Identify container object (or the neighbor one) and perform coordinate-based relative click (e.g. 5 pixels to the left from container's right border) so that it is executed over the pencil icon, like it was suggested by Benoit; or

    -- Search for the span with the pencil using CSS/XPath and call .click() method for the found object. Note: small initial 'c' is essential, because the result of the search will be not TC-object, but native DOM one which does not provide .Click() method. (The latter is provided by TC for the objects that are included into Objects tree.)