Support Request: Script help


In regards to devblog:
We had this script working some time ago, but then the submit button was not longer getting activated. The user name and password are getting put in, but then it doesn't continue on. I'm wondering if someone there might have a quick answer. I've been through the forum, dev blogs and google searches, but just can't seem to find a solution. I've included a screen shot of the web page properties. (I know this probably isn't a support issue, but grasping at straws to see if someone might have some suggestions). Thanks!

The script is as follows:

//Message event used to detect navigation to login page
SiteKiosk.Logfile.OnMessage = OnMessage;
function OnMessage(seq, time, utcoff, awtype, awlevel, facility, text)
//Check the SiteKiosk logs if the login page has been called and then call the function to attempt the automated login
if(text.indexOf("Navigation: ") !== -1 && text.indexOf("") !== -1)
//Delays the automatic login to give the page time to load
evtid = SiteKiosk.Scheduler.AddDelayedEvent(3500, AutomaticLogin);

function AutomaticLogin()
//Go through the open windows to find the browser window with the login page
for (var i=1;i<=SiteKiosk.WindowList.Windows.Count;i++)
//Make sure the window is a SiteKiosk browser window and it displays the login page
if (SiteKiosk.WindowList.Windows(i).WindowType === 1 || SiteKiosk.WindowList.Windows(i).WindowType === 2)
SiteKiosk.Logfile.Notification("------ Found the open window and Adding the data to the text boxes.");
SiteKiosk.WindowList.Windows(i).SiteKioskWindow.SiteKioskWebBrowser.WebBrowser.Document.getElementById('UserName').value = "sclody(at)";
SiteKiosk.WindowList.Windows(i).SiteKioskWindow.SiteKioskWebBrowser.WebBrowser.Document.getElementById('Password').value = "NotTheRealPassword";

var inputs = SiteKiosk.WindowList.Windows(i).SiteKioskWindow.SiteKioskWebBrowser.WebBrowser.Document.getElementsByTagName("BUTTON");
for (var i=0; i < inputs.length; i++)
if (inputs[i].getAttribute('type') == 'submit')


Answer: (1)

Re: Script help 8/6/2021 9:11 PM

Thank you for your inquiry. Please note that customization of coding is not included with our free support. However, I can explain the other solutions provided in Developers Blog. Before I do that, there maybe some websites that prevent automated scripts from making DOM changes. You will need to email us [ support-america(at) ] or consult a Web Developer for another solution if these below, do not work.

First, check to see if your example behaves differently with IE vs Chrome in SiteKiosk. Since most companies are switching to Chrome browser and also assuming that you will be using the Chrome Browser inside SiteKiosk, here are other solutions:

JavaScript only -
By including your JavaScript code in this blank file ( C:\Program Files (x86)\SiteKiosk\SiteKioskNG\assets\customScriptExtension.js ), you can manipulate any HTML element as you see fit on any website you need. You will not need to know any SiteKiosk Object Model commands. See link for more:

JavaScript (a bit SK Object Model) and WScript (for keyboard commands) (Works with IE) -
This solution still uses JavaScript but instead of manipulating page elements, it simulates keyboard actions through Wscript. You can read more here:

This link is in the instructions above but I would like to point them out here (for other special keyboard key presses like TAB and others):

Best regards,
My Account