I have to retrieve all values from the following HTML page like data0, data1, data2 etc,
</head><body onload="OnLoadEvent();">
<form name="form1" action="https://products.cs.co.in/demo/jsp/cs/HResult.jsp" method="post">
<input type="hidden" name="data0" value="7320851">
<input type="hidden" name="data1" value="449781">
<input type="hidden" name="data2" value="">
<input type="hidden" name="data3" value="ACEE6F7C7">
<input type="hidden" name="data4" value="">
<input type="hidden" name="ref" value="">
<input type="hidden" name="data5">
<input type="hidden" name="result" value="">
<input type="hidden" name="data6" value="">
</form>
<div align="center" class="text12">
<br><br>
Please do not refresh / close the window
<br><br>
</div>
</body>)
I am using the below swift code to retrieve all values inside Form ,
webView.evaluateJavaScript("document.getElementsByName('form1').value") { (result, error) in
print(result as Any)
print(error as Any)
}
But i am receiving nil from result variable. Kindly help on how to retrieve all values inside form using SWIFT language.