Apr-24-2019, 04:11 PM
I've tried this in the past using requests and or selenium, as I recall requests was good a filling in the forms and selenium was okay and mimicking a browser but I haven't found a good tool to do both and I don't believe I can make them share a connection variable/object.
This is the rundown of what I need:
connect to URL
ask user to enter username and store in username-variable
ask user to enter password and store in password-variable
input data from username-variable into username field:
input data from password-variable into password field:
click button:
Any suggestions on the best way to accomplish this? Thanks.
This is the rundown of what I need:
connect to URL
ask user to enter username and store in username-variable
ask user to enter password and store in password-variable
input data from username-variable into username field:
<input id="inptUserId" maxlength="8"
name="txt_inptUserId" onkeyup="autoSkipNN(event.which,this);" onfocus="saveFocusedControl("inptUserId");" style="background-color:Window;font-size:11px;height:19px;width:67px;line-height:11px;left:275px;padding-bottom:0;font-family:Arial;border-width:2px;position:absolute;border-style:inset;top:101px;color:000000;padding-top:0;" tabindex="26"
title="" type="text" value="">
input data from password-variable into password field:
<input id="password" maxlength="8"
name="txt_password" onkeyup="autoSkipNN(event.which,this);" onfocus="saveFocusedControl("password");" style="background-color:Window;font-size:11px;height:19px;width:67px;line-height:11px;left:445px;padding-bottom:0;font-family:Arial;border-width:2px;position:absolute;border-style:inset;top:101px;color:000000;padding-top:0;" tabindex="28"
title="" type="password" value="">
click button:
<input alt="Enter" id="btnOK"
name="btn_btnOK" onfocus="saveFocusedControl("btnOK");" style="font-family: Arial; font-size: 12px; font-weight: Bold; position: absolute; left: 19px; top: 292px; width: 49px; height: 23px; color: #ffffcc; background-color: transparent; border-width: 0px; text-align:left;padding-left:0px;padding-right: -5px;cursor: pointer; padding-left:0px;padding-right:0px;" tabindex="-1"
title="" type="submit" value="Enter">
Any suggestions on the best way to accomplish this? Thanks.