Test Complete does not recognizes the application if the application is launched in win7 through cmd
Test Complete does not recognise application when application is launched through command prompt in win 7
but it recognizes application and objects when the same application is launched through command prompt in win 10
If Instr(OS_VERSION, "Microsoft Windows 10") <> 0 then
Set objShell = CreateObject("WScript.Shell")
Set objEnv = objShell.Environment("Process")
WinPath = objEnv("SystemRoot") & "\System32\runas.exe"
'TestUser access information.
domain = Sys.HostName
AppExePath = "C:\Program Files\App.exe"
Call objShell.Run("runas /user:" & domain & "\" & user & " " & aqString.Quote(AppExePath ), 1, FALSE)
Call Sys.WaitProcess("runas", 5000)
Call objShell.SendKeys(password & chr(13))
Why are you sending your keystrokes to the objShell? That seems a rather round about way to enter commands to the application under test, given that TestComplete can interact directly with most applications.
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider