Solved

How to extract HTML table input tag values

  • 19 May 2023
  • 5 replies
  • 452 views

Badge +1

I’m trying to capture a table using the universal recorder in Automation Anywhere 360. However, the values that I’m trying to display are input tags in html. I need to capture the value of those input fields within the table.

The html looks like this:

<table class="s-grid-table-body" cellspacing="0" cellpadding="0">

  <tr class="s-grid-row">

    <td class="s-grid-cell-edit s-inplace" style="width: 234px;">

      <div class="s-grid-cell-value-edit s-inplace-value-edit">

        <input type="text" autocomplete="off" spellcheck="false" autocorrect="off"

        class="s-inplace-input" readonly="readonly" maxlength="25" id="10-368-input"

        title="">

        <a title="Open choice list" class="s-inplace-edit-picker s-fonticon-btn s-btn-expand_m">

          

        </a>

      </div>

    </td>

The table itself renders like this:

 

When I use the get table action in the recorder, I get this value    in the table. I need ‘Confirmed’.

Is there a way to do this?

icon

Best answer by Raul Jaimes 20 May 2023, 05:27

View original

5 replies

Userlevel 5
Badge +9

@donovanconley 

Check if you able to get the value from outerHTML or innerHTML properties.

 

 

Regards

Badge +1

Thanks for the response Raul.

 

They both just contain parts of the html I mentioned above. But the displayed value isn’t anywhere in the html.

 

Userlevel 5
Badge +9

@donovanconley 

Other option is using Browser Get source code  and then try to get the specific code and selecting a frame.

Otherwise, you will need a Javascript approach. 

 

Regards

Userlevel 4
Badge +10

HI @donovanconley ,

As it is a table you can get Table and then put a loop on it : For each row in a datatable and then you can display the values one by one using record variable.

Badge +1

Hi Raul, I tried the Browser Get Source Code and it doesn’t have the values. I was able to get it using JavaScript: 

document.getElementsByClassName("s-grid-table-body").item(2).rows[0].cells[21].querySelector('input').value

Reply