Sign in to follow this  
Followers 0

Script not work when i close remote desktop.

3 posts in this topic

Posted

I have write a script to attach a picture in selenium code. I run the selenium code on server, windows 2003 server 64 bit, if i open the remote desktop, the script will work, if i minimize the remote desktop, wait a moment , then reopen it, the script will execute to attach file, but it didn't click the "open" button, I don't know why i must open the remote desktop to let the script work.

Here are the codes:

$title = "打开"

$fileDir = "E:\aa.png"

WinWait($title)

WinActivate($title)

ControlSetText($title, "", "[CLASS:Edit; INSTANCE:1]", $fileDir)

Send("{Enter}")

Share this post


Link to post
Share on other sites



Posted

anyone know how to resolve it?

Share this post


Link to post
Share on other sites

Posted

You're probably starting the script on a remote user session. As far as I remember, when you close this remote session, you're effectively logging the user out. I believe there is a way you can stop this, but I can't remember how.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0