qentinelqi / qweb

Keyword driven automation for the web
https://github.com/qentinelqi/qweb
Apache License 2.0
40 stars 17 forks source link

Can not retrieve text from some <slot> elements with Get Text or Get Cell Text #141

Closed tkoukkari closed 7 months ago

tkoukkari commented 7 months ago

Describe the bug If a slot element has just text in it (no child elements) it's text contents can not be retrieved with Get Text or with Get Cell Text

To Reproduce In Salesforce Create Account record Create a Case under the Account Open Accounts Cases related list view

Text from Contact Name column can not be retrieved even if visibility check has been set to false with Set Config Visibility False

Script for reproduction

*** Settings ***
Library    QForce
Suite Setup    Suite Setup Actions

*** Variables ***
${username}         set this
${domain}           set this
${login_url}        set this

*** Keywords ***
Suite Setup Actions
    Open Browser    ${login_url}    chrome
    Type Text    Username    ${username}
    Type Text    Password    ${sf_pw}
    Click Text    Log In

    Verify Text    Home

*** Test Cases ***
Slot - Contact Name
    [Documentation]    Slot with text only, subject and owner are similar
    # set the domain and replace the account id with a valid one
    GoTo    ${login_url}/lightning/r/Account/0017Q00000j4QGOQA2/related/Cases/view
    Set Config    Visibility    True
    TRY
        ${con1}=    Get Text    Jill  # not found
    EXCEPT
        No Operation
    END
    ${con2}=    GetCellText    r2/c4    # empty str

    Set Config    Visibility    False
    ${con3}=    Get Text    Jill  # empty str
    ${con4}=    GetCellText    r2/c4    # empty str

    Set Config    Visibility    True
    TRY
        ClickText    Jill    # empty <slot>
    EXCEPT
        No Operation
    END
    Set Config  Visibility  False
    ClickText    Jill