I hope someone would have an idea on how to solve this. My goal is to loop through rows of an html table, find certain fields in each row (textboxes and checkboxes mainly) and manipulate each row accordingly. This is part of a billing solution. Basically, a customer sends a PO (purchase order). Once the PO is fulfilled, we invoice the PO on a portal. So I have to loop through my invoice lines and try to match the original lines on the PO, and If there's a match, I enter the QTY from the invoice line (could be same as the original requested qty) or different into the corresponding line. The matching of the lines is done by item#.
The chanllenge I'm facing is the web page I'm working with renders the elements dynamically. So I can't rely on the IDs of the fields because they change constantly. The page displays the purchase order header section, and then a table of PO lines. The table has this header/structure seen on the attached screenshot. I've also included the html of the first checkbox and item# textbox. The html for the rest of the fields on the subsequent rows is basically the same except for the IDs being different.
I'm using the "Extract data from webpage" action with the "Process data upon extraction" option set. This returns me the static data and it's helpful. I can loop through the results of the variable. Now, I just need to reference the input fields (textboxes and checkboxes) which can only be identified by their CSS selectors, and enter the Qty, unitprice and check/uncheck the chekbox if we're invoicing this line or not. Then submit the invoice.
Any ideas on how to achieve that would be appreciated.
sample HTML of the fields:
<td style="padding-top: 6px; vertical-align: top;" width="1" align="left" class="tableBodyClass fdml-sii-lit-tableBody">
<div bh="CHK" class="w-chk w-chk-dsize">
<input tabindex="0" bh="GAT" id="_b_fuwc" type="checkbox" value="1" checked="" class="w-chk-native" hasaction="true">
<label data-icon="" aria-hidden="true" class="w-chk-block is-block"></label
</div>
</td>
<td style="vertical-align: top; vertical-align: top; " valign="top" align="left" colspan="1" class="tableBodyClass fdml-sii-lit-tableBody">
<input value="10441234" type="text" onblur="ariba.Handlers.hTextBlur(this, event)" id="_iq49kd" class="w-txt-active w-txt w-txt-dsize w-txt-ssize"
bh="TF" autocorrect="off" autocapitalize="off" _tf="FRF" _pl="" maxlength="200" name="_iq49kd" awmousedown="true" awmouseup="true">
<div class="rr" id="_vopwgc"></div>
</td>