Skip to Content
0
Jun 10, 2020 at 05:39 PM

SAP iRPA and HTML forms

320 Views

Hello Experts,

I am having a situation here with HTML forms and SAP iRPA.

I am having 2 input fields and a button inside a HTML form:

<form action="{{ url_for('submit')}}"method="POST">
    <input type="text" class="FName" id="FName" name="FName" placeholder="First Name" required="required" /><br/>
    <input type="text" class="LName" id="LName" name="LName" placeholder="Last Name" required="required" /><br/>

    <button type="submit" id="submit">Submit</button>
</form>

Is it possible to populate both the fields with different values, and click on the button?

Using JavaScript, I can populate the form fields like below:

document.getElementById("FName").setAttribute('value','John');
document.getElementById("LName").setAttribute('value','Doe');
document.getElementById("submit").click();

But I am not able to getting these in SAP iRPA Desktop Studio. Once I capture the web page, it just shows the whole HTML Form as one table, and after build is completed, I am getting option to set values in a table format as below:

for (var indexligne in rootData.SubmitData.pSubmitData.oFORM){
	for( var indexcol in rootData.SubmitData.pSubmitData.oFORM[indexligne]){
		SubmitData.pSubmitData.oFORM.i(indexligne, indexcol).set(rootData.SubmitData.pSubmitData.oFORM[indexligne][indexcol]);
	}
}

Please help me out with some guidance on how I can fill up the form fields "FName", "Lname" and click the "submit" button.

Thanks in advance.