Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Script not work when i close remote desktop.


  • Please log in to reply
2 replies to this topic

#1 guan0089

guan0089

    Seeker

  • New Members
  • 2 posts

Posted 13 March 2012 - 09:15 AM

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}")







#2 guan0089

guan0089

    Seeker

  • New Members
  • 2 posts

Posted 14 March 2012 - 08:31 AM

anyone know how to resolve it?

#3 James

James

    Universalist

  • MVPs
  • 10,165 posts

Posted 14 March 2012 - 03:17 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users