Solution 1 :

With the assumption that you desire a list of values, I created the below example that uses the Get Text keyword but can easily be adapted to suit your needs:

*** Settings ***
Library    SeleniumLibrary    
Library    Collections    

*** Test Cases ***
Get Multiple Element Values
        Open Browser    https://www.w3schools.com/default.asp    chrome
        @{webelements}    Get WebElements    xpath://a[@class='w3-bar-item w3-button']
        @{webelements_text}    Create List

        :FOR    ${webelement}    IN     @{webelements}
            ${text}    Get Text    ${webelement}
            Append To List    ${webelements_text}  ${text}

        Log List    ${webelements_text}    
        [Teardown]    Close Browser

Problem :

I would like to read a sibling of a text in my html code.

This text can be once or more times in my html

using inspector, this works:

xpath://*[angular-parent//div[text()='Text to find']/following-sibling::div//angular-child//span]

but when I try to read from html:

    ${value}  Get text  ${signal}

it only give me the first value. How can I get all of them?

Comments

Comment posted by cucuru

thanks, this is not exactly what I needed, but based on this, I was able to fix my code

By