Is there a way to verify a form text all at once

Hi, so I am looking to verify a form that has text in specific locations.
Mostly we do: get text id=someid == “this text”

However when there are multiple items on forms, it can get tiresome.

I was thinking is there a keyword that i could use, that would grab all elements and texts under an id, and then compare that data to a list/scalar that has the required info already attached.

The form format is like this:
div id=Some unique id
-div class=title>sometitle
-div class=title>sometitletext
-div class=title>sometitle
-div class=title>sometitletext
div id=second irrelevant id
cant add "<div- " as it does not show up in this forum, that’s why that css looks funky
So the keyword shoud grab all elements and texts under that Some unique id. And then I would need to copy the data to variable, and compare it.

EDIT: Okay just realized that get text can be used to grab the whole text under that id. If there is a way to grab text and page format, that would be even better
Get HTML structure id=some unique id


Quickly from what you mentioned, I would do something like this :

*** Variables ***
${id}    some_unique_id
@{expected_titles}    sometitle    sometitletext    sometitle    

*** Test Cases ***

    ${subtitles}    Get Element Count    //div[@id='${id}']//div
    FOR    ${subtitle}    IN RANGE    1    ${subtitles}
        Element Text Should Be    //div[@id='${id}']//div[${subtitle}]    ${expected_titles[${subtitle}]}    

Depending of the structure, that might be improved or factorised.
@{expected_titles} could be also replaced by a csv obtained through pandas or other.

Best Regards.



Thanks, I’ll look in to that also, the solution that I was thinking was to grab all the info listed in my screencap and compare that to a known data.
so “Get HTML Tree id=ember3” or something in that line.