Hi everybody
I want to navigate through the DOM of a webpage, with a specific structure. Actually, I don’t have clue how to solve this task safe, easy and reliable. Maybe somebody of you can give me an hint.
Given is a html structure like this:
<div id="[random_id]">
<div id="field_01">...</div>
<div id="" class="field_error">specific error for field 1</div>
[...]
<div id="field_02">...</div>
<div id="" class="field_error">different error for field 2</div>
[...]
<div id="field_03">...</div>
[...]
</div>
- fields have an uniqe id
- error messages never have an id
- field errors will always be shown below the corresponding field
- field errors do only appear if an error exists. Here, field_03 does not have an error
- fields and messages are not grouped in parent->child relationships
- between those pairs can be various html tags. […] I simplified this example
Task is to get all the error messages and the exact corresponding field_id. It looks quite easy to get all the information. Actually, I used the find-children-activity to get all the error messages. That works fine. But I cannot get the corresponding field id.
Do you have an idea?
Your
Enrico