Sort of new here, been lurking in the wings for years, and I am stuck hoping someone can give me hand.
I am trying to automate a repetitive task for work using DOM in internet explorer. I can't for the life of me get my 'number' to fill into an element on IE.
I am using IE 11. The inspect element is.
<input name="claimNo" class="bodyText" id="claimNo" type="Text" size="10" maxlength="6" value="" lpcachedvisval="1" lpcachedvistime="1484754693">.
I tried writing a basic script to test, and it doesn't work.
Code: Select all
#SingleInstance force
#NoTrayIcon
wb := ComObjCreate("InternetExplorer.Application")
wb.Visible := true
wb.Toolbar := False
wb.Navigate("work_URL")
while wb.busy
sleep, 100
Sleep, 1000
workorder_number := wb.document.getElementById("claimNo")
workorder_number.Value := 123456
So, before writing all of my code, I tried simply controlling the webpage with the console built in.
Using the console in IE11, I type, document.getElementByID("claimNo").value = 123456;
I get error Unable to set property 'value' of undefined or null reference
Out of curiousity. I loaded my webpage into Google Chrome, and tried the exact same process, and it fills in the 'claimNo' element no problem. Is there something I am missing? Can anyone help me?
I hope I have provided enough information.
Justin