UFT windows popup identification issue in windows locked remote machine - hp-uft

So I have been having a problem with running this UFT script using windows RDP session, I have a task scheduled in task scheduler to trigger this script. As I know the problem is that the application displays a windows popup message which UFT is NOT able to identify since the scripts are executing in the remote machine which is locked. But when I login to the remote machine and trigger the scripts or task manually it runs fine.
I have the object stored in the shared repository and this is the code I am using:
Browser("Member Website").Dialog("Message from webpage").WinButton("OK").Click
I am using UFT 12.52 and the application is a webbased application running on Internet Explorer.
How can I make sure that UFT script is able to click the windows popup button when windows is locked?

Related

How to open GUI application on Windows via SSH if no active user sessions?

I am working on a project where I need to run a few tests through SSH using an interactive GUI application on multiple Windows VMs. I have seen various other solutions here for launching the GUI application such as with psexec or running schtasks and a .bat file. I have tried all of that. Unfortunately, the only time the GUI opens is when there is an active user session. For example, if I do something like psexec -i 22 path\to\bat\file it will launch the GUI with my active RDP session. This will still work while I am disconnected, as the user session is still active. However, if I log out of the user session entirely and try the same (either with psexec or directly running a bat with schtask), it won't work. It will simply run the GUI application as a background process, as when I login again with RDP, the GUI isn’t present and it only shows as a background process in the task manager.
Is there a way to trigger an RDP or some GUI style user session to become active in a headless manner? If not, then is there a different way to execute my application, where the interactive GUI is available with SSH or other means of headless connection when there is no active user signed in?
The Windows VMs have OpenSSH server running for connections.
This question actually solved the other half of the puzzle for me, namely how to get SSH connections to use the interactive session. Here's how to keep an active interactive session open at all times. Note that depending on your use case you might explicitly need a multi-session windows installation, which is a different VM image in Azure for example.
Have the user you want these commands to run in log on automatically when windows boots. https://learn.microsoft.com/en-us/troubleshoot/windows-server/user-profiles-and-logon/turn-on-automatic-logon
Create a .bat file with the following contents somewhere (for me it's just on C:) tscon 1 /dest:console
In task scheduler, create a task that runs this bat file whenever a remote user disconnects.
Point 2-3 are not necessary if you never RDP into the autologon user. Whenever you RDP to this user, the console session moves from the autologon session to your RDP session, and this script just reattaches the console session back when you disconnect. This way, that user always has the console attached and thus has GUI available.

Launch my application before the Windows logon screen

In a personal project, I want to display my application before (or above) the Windows Logon, ie just before entering the Windows password.
The application must "hide" the password entry screen. I used to launch an application at Windows startup but this after viewing the Windows desktop.
Is it possible to do this please? Should I create a Windows service that will launch my application?
Thanks for your help
If this is just a personal project on your own machine you could set Windows to autologon and then just run your application like a normal startup shortcut.
A NT service is the only documented way to run code before a user logs on. However, spawning a new process in another session and interacting with the Winlogon desktop and putting yourself on top of LogonUI.exe is going to be a hack.

opened dialog window in windows service

I am running some Windows application as a service. This application used Office applications(Word, Excel). The service runs under specific user account.
Here is the problem:
When service is trying to use Excel, Excel is showing some dialog window which blocks the application from running. Since it's a service running in noninteractive mode you are not able to see the dialog window.
I was wondering if there is a way to get the title of a dialog window to understand the root cause of it.
I tried using EnumDesktopWindows but it didnt help.
Platform: Windows 10.
Thanks

Running Internet Explorer on LocalSystem Account on Windows 2012

I'm setting up Selenium Grid. We have a separate machine for each version of the browser.
Each node is started as System Service running on LocalSystem account with interactions with user desktop enabled.
This is required because Selenium Grid node starting Internet Explorer have problems making screenshots and transferring them when there was no interaction with user desktop.
As far as I was able to check, it looks like that interactions with user desktop for service are only allowed for LocalSystem account. Event changing manually flags in registry does not seem to works (as it was in windows 2008)
Everything is working fine except the test where I need to perform upload of the file. When there is an action to open dialog for file browsing, following popup appears
Is there any way to prevent this (creation of folder Desktop does not seem to work) ?
From the other hand, if there is a way to run service under different account with interactions with user desktop enabled, that would also be a case.
I would appreciate any help because I'm stuck with the problem
I have checked some additional solutions, like running selenium grid nodes via PowerShell Invoke-Command and this did not worked too.
I have managed to run selenium grid nodes as Windows Service with desktop interactions using 3rd party tool FireDaemon Pro Service Manager.
I didn't try this but PsExec -s should work
https://technet.microsoft.com/en-us/sysinternals/bb897553

windows 2003 doesn't open cmd as "interact with desktop" when using scheduled tasks

i have two windows servers : windows server 2003 and windows server 2008.
in windows 2008 when i start a batch script through scheduled task,
it opens a visible CMD window with my batch on it.
in windows 2003 on the other hand when i start a batch script through scheduled task,
it doesn't open a visible CMD window (interact with desktop not available?) but i can see the process of the batch running in the background.
does anyone knows how can i activate the Desktop? so i can see the CMD open
Thanks :)
so i found the solution. there were two thing i had to do:
A- check the checkbox for "Run only if logged in" in the task itself.
B- enable "Allow service to interact with desktop" on the task scheduler service.
1.)Click Start, click Control Panel, and then double-click Administrative Tools.
2.)Click Computer Management.
3.)Expand Services and Applications, and then click Services.
4.)Right-click the Task Scheduler service, and then click Properties.
5.)On the General tab, make sure that the startup type is set to automatic, and that the service status is Started. If the service is not running, click Start.
6.)On the Log On tab, make sure that the local system account is selected, and that the Allow service to interact with desktop check box has a check mark.
7.)Click OK, and then quit Computer Management.

Resources