How can I get All Text in robot framework ?

0 votes

I have written this following source code,

<div id="groupContainer" class="abcdef">

<ul id="GroupContactListWrapper" class="list-wrapper">
    <li class="contactNameItemContainer">

        <div class="contactNameItem">
            <span class="name">Name</span>
        </div>

    </li>
    <li class="contactNameItemContainer">

        <div class="contactNameItem">
            <span class="name">Name1</span>
        </div>

    </li>
</ul>

</div>

How can I retrieve the names (Name, Name1) in a list variable? I tried using the XPath to "Get Text" keyword but only returns the first one.

//div[@id='groupContainer']//li[@class='contactNameItemContainer']//span

Please help me with a suitable answer.

Jul 1 in Selenium by Vaishnavi
• 1,160 points
152 views

No answer to this question. Be the first to respond.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.

Related Questions In Selenium

0 votes
1 answer

How can I clear the text in a text box using Selenium WebDriver?

Hello Akriti, you can clear the text ...READ MORE

answered May 29 in Selenium by Anvi
• 13,960 points
293 views
0 votes
1 answer
0 votes
1 answer

How can I get Webdriver Session ID in Selenium?

Hey Nargis, you can use following methods ...READ MORE

answered Jun 21 in Selenium by Abha
• 27,180 points
588 views
0 votes
1 answer
+2 votes
2 answers

How can I press ENTER key with the execute_script in selenium python?

The below code containing Keys.ENTER might just ...READ MORE

answered Mar 27, 2018 in Selenium by nsv999
• 5,110 points
7,887 views
0 votes
1 answer

Finding WebDriver element with Class Name in java

The better way to handle this element ...READ MORE

answered Apr 10, 2018 in Selenium by nsv999
• 5,110 points
926 views
0 votes
1 answer
0 votes
1 answer

Geo-location microphone camera pop up

To Allow or Block the notification, access using Selenium and you have to ...READ MORE

answered May 11, 2018 in Selenium by Samarpit
• 5,130 points
1,108 views
0 votes
1 answer

How to use such xpath to find web elements

It's much simpler to use: #MyDiv123 > div.super or ...READ MORE

answered Jun 14, 2018 in Selenium by Samarpit
• 5,130 points
848 views