i want to fire a custom action (automation script) from a dialog in an application. When i put this action on the OK-Button of the Dialog, the action is executed, but the dialog is not closed.
I found a workaround to send this "dialogok" notification from the automation script, but am missing some information that i need to really automate it.
from psdi.webclient.system.controller import SessionContext, Utility, WebClientEvent
from psdi.webclient.system.session import WebClientSessionManager
uisessionid = "12"
c = WebClientSessionManager().getWebClientSession(uisessionid)
Utility().sendEvent(WebClientEvent("dialogok", c.getCurrentPageId(), None, SessionContext(c)))
The bold marked value is my problem. This should represent the actual uisessionid where the OK-Button is clicked. If i enter the actual value from my session there this works like a charm (for this session at least). But however i try, i am not able to retrieve this value automatically.
Anyone has an idea on how to obtain the current WebClientSession?