Question

2
Replies
131
Views
Shanthakumar O (ShanthakumarO)
Ford Motor Company Ltd

Ford Motor Company Ltd
IN
ShanthakumarO Member since 2019 6 posts
Ford Motor Company Ltd
Posted: September 13, 2019
Last activity: September 20, 2019
Posted: 13 Sep 2019 9:56 EDT
Last activity: 20 Sep 2019 8:44 EDT
Closed
Solved

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

Hi,

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, This thread is closed to future replies. Content and links will no longer be updated. If you have the same/similar Question, please write a new Question.