ShanthakumarO Member since 2019 6 posts
Ford Motor Company Ltd
Posted: 1 year ago
Last activity: 1 year 1 month ago

How to get the inner text by passing inner html line dynamically in the automation


I have interrogated a webpage which has 3 fields (all are readonly fields) in it and their InnerHtml were as below,

Field 1 - <label class="field-caption dataLabelForRead" for="T01">AAAA</label><div class="field-item dataValueRead"><span>XXXX</span></div>

Field 2 - <label class="field-caption dataLabelForRead" for="T02">BBBB</label><div class="field-item dataValueRead"><span>YYYY</span></div>

Field 3 - <label class="field-caption dataLabelForRead" for="T03">CCCC</label><div class="field-item dataValueRead"><span>ZZZZ</span></div>

Its not that all the time these 3 fields would be displayed in the page. Sometimes only 2 field would be displayed. So in such case, as i have the webpage interrogated, need to do the following,

1. Check whether the fields are available in the screen

2. If available get the respective output value (i.e, XXXX, YYYY and ZZZZ)

Note: In above Html lines, T01, T02, T03, AAAA, BBBB and CCCC are the names i have it in excel, so i can get the values from my excel sheet. where XXXX, YYYY and ZZZZ are the output i required.

For eg: I have given 3 fields here. In my application there are 30+ fields which needs to worked on. So it would be so helpful if there in one automation line which passes the parameters (T01, TC02, TC03, AAAA, BBBB, CCCC) dynamically.

Robotic Process Automation
Moderation Team has archived post
Share this page LinkedIn