I'm trying to click away an Internet explorer (windows security) sign in pop dialog used for signing in. The test is a jar file containing a Silk4J script and is run with Silk Central on a different machine using the execution server. When the remote desktop session is active it works fine but when the session is minimized or closed it doesn't work. Regular DOM push buttons show no problem when using .select()
and work fine in my current setup.
Code snippet:
BrowserType browserType = BrowserType.InternetExplorer;
BrowserBaseState baseState = new BrowserBaseState(browserType, url);
browser = baseState.execute(desktop);
browser.setActive();
generalWebPage = browser.find("//BrowserWindow");
loginDialog = browser.find("//Dialog");
loginDialog.setActive();
loginDialog.<TextField> find("//TextField").setText(username);
loginDialog.<TextField> find("//TextField[2]").setText(password);
loginDialog.<PushButton> find("//PushButton[@caption='OK']").select();
Again regular DOM elements work fine while the session is NOT active. But Silk just won't hit this dialog push button. I've tried setFocus
, sendKeys(Enter key)
and even Tabs en Space.
What am I missing? Thanx in advance!
( Silk 15 and IE 11)
Silk Test needs the UI session to be open and unlocked to do user input - if you close a Remote Desktop session, it will automatically lock the UI session and Silk Test will no longer be able to send user input to the application.
If you really want to work with a locked session, using
DomClick
andSetText
may work in the browser, as they're based on JavaScript events, but as you mentioned this won't help with the security dialog, so I see no way around unlocking the UI session to do theClick
action in order to close the dialog.