So currently I am working on an autofill project in swift 3 to fill a website form with data.
I have figured out the filling of the text fields, but cannot figure out how to click the button. The code for the button is as follows:
<div id="isc_5D" eventproxy="isc_ButtonItem_12_button" style="position: absolute; left: 55px; top: 94px; width: 200px; height: 30px; z-index: 201242; overflow: hidden; cursor: pointer; -webkit-margin-collapse: collapse collapse; box-shadow: white 0px -1px 1px inset, white -1px 0px 1px inset, white 1px 0px 1px inset;" onscroll="return isc_ButtonItem_12_button.$lh()" onfocus="isc.EH.focusInCanvas(isc_ButtonItem_12_button,true);" onblur="if(window.isc)isc.EH.blurFocusCanvas(isc_ButtonItem_12_button,true);" tabindex="2896" role="button"><table cellspacing="0" cellpadding="0" width="200px" height="30px" style="table-layout:fixed"><tbody><tr><td class="buttonRounded" style="padding-top:0px;padding-bottom:0px;text-align:center;vertical-align:middle"><div style="display:inline-block;max-width:100%;white-space:nowrap;vertical-align:middle"><div id="isc_5C" style="overflow:hidden;text-overflow:ellipsis"><b style="font-size:18px;">Login</b></div></div></td></tr></tbody></table></div>
If you need to look at the website yourself, its URL is https://jpams.lpssonline.com/progress/
Edit:
It may be best to go to the site and inspect element this button:
So for I have tried:
document.getElementById("isc_D").focus();
document.getElementById("isc_D").click();
which worked to fill the textfields (first you focus, then you change the value for the textfield) but I can not seem to click this button.
I even tried submitting the form it is placed on, but that just refreshes the page. It would be preferable to not have to use the submitting the form method because after logging in there are more buttons that are coded like the login button and I need to know how to click all of them.