RequestFormSubmitById
Interface AntViewDocument
Type: Method
Parameters: String FormId
Returns: nothing
Submit the form identified by id in the html as passed in FormId.
Note that the id is case sensitive and must match the case of the html element.
When the submit completes, the OnRequestFormSubmitById event is triggered.
Example:
Suppose we have the following html:
<form id="login" class="login" action="thankYou.html">
<div class="loginName">
<label for="username">UserName</label>
<input type="text" name="username" placeholder="User Name" required />
</div>
<div class="loginPassword">
<label for="password">Password</label>
<input type="password" name="password" placeholder="Password" required />
</div>
<div class="loginBtn">
<button id="submit" type="submit" name="submit">Login</button>
</div>
</form>
Code in DataFlex:
Object oSubmitButton is a Button
Set Location to 199 144
Set Label to "Submit"
Set peAnchors to anBottomLeft
Procedure OnClick
Send ConnectBrowser to oDocument
Send ComRequestFormSubmitById to oDocument "login"
End_Procedure
End_Object
There's also a synchronous alternative RequestFormSubmitByIdSync that wraps this method and the event into one call.
AntView - The MS Edge WebView2 ActiveX control Date last changed: 09/25/2024