Webform automatic fill in

Hey Scriptkiddo’s.

I’m trying to automate a webform fill in. I’ve managed to get a decent way but I’m stuck at this point and I hope someone can help me.This is the script I have atm. But I’m stuck, I want to fill in the serial number in a text field and then I have to press enter for the search to work. I can fill in a s/n but I can’t mimic a search request. If I do it manual I can fill in the serial key and after 2 or 3 seconds the search starts by it self, if I use the fill button however it does not. 2nd option if I fill in the S/N and then press enter the search starts. Any wild idea is welcome.

login $contractno = "*"; Your twitter password $customerno = "*"; $printerserial = "*" $url = "*"; Create an ie com object $ie = New-Object -com internetexplorer.application; $ie.visible = $true; $ie.navigate($url); Wait for the page to load while ($ie.Busy -eq $true) { Start-Sleep -Milliseconds 1000; } Login Write-Host -ForegroundColor Green "Attempting to login to OKI."; Add login details $ie.Document.IHTMLDocument3_getElementById("ctl00_DefaultContent_txtUserName").value = $customerno; $ie.Document.IHTMLDocument3_getElementById("ctl00_DefaultContent_txtPassword").value = $contractno; Click the submit button $ie.Document.IHTMLDocument3_getElementById("ctl00_DefaultContent_btnlogin").Click(); Wait for the page to load while ($ie.Busy -eq $true) { Start-Sleep -Milliseconds 1000; } $ie.Document.IHTMLDocument3_getElementById("ctl00_btnOrder").Click(); while ($ie.Busy -eq $true) { Start-Sleep -Milliseconds 1000; } $ie.Document.IHTMLDocument3_getElementById("ctl00_DefaultContent_rcbMachine_Input").Click(); $ie.Document.IHTMLDocument3_getElementById("ctl00_DefaultContent_rcbMachine_i0_RadGrid1_ctl00_ctl02_ctl02_FilterTextBox_MACHINE_NUMBER").Click(); $ie.Document.IHTMLDocument3_getElementById("ctl00_DefaultContent_rcbMachine_i0_RadGrid1_ctl00_ctl02_ctl02_FilterTextBox_MACHINE_NUMBER").value = $printerserial; { Start-Sleep -Milliseconds 10; } $ie.Document.IHTMLDocument3_getElementById("ctl00_DefaultContent_rcbMachine_i0_RadGrid1_ctl00__0").Click(); } 

submitted by /u/spletZ_
[link] [comments]

Leave a Reply