appveyor / ci

AppVeyor community support repository
https://www.appveyor.com
344 stars 65 forks source link

window never get active #1266

Open llafuente opened 7 years ago

llafuente commented 7 years ago

Hi,

I'm trying to install Unity & login with AutoHotKey. It works on local, it work on RDP, but not with Appveyor.

The reason: Unity window never get active. I try 4 different methods (see https://github.com/llafuente/unity-platformer/blob/master/Scripts/unity.ahk), all fail, the script leave a log with timeout (ErrorLevel = 1) for every method at C:\projects\unity-platformer\autohotkey.txt

The project is: https://github.com/llafuente/unity-platformer

I will explain what I do...

Appveyor.yml

version: '{build}'
os: unstable # for interactive
platform: x64

install:
  # I want to enable desktop, download first
  - appveyor DownloadFile https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-desktop.ps1

build_script:
  # enable-desktop, install unity, unity-test-tools & autohotkey
  # then bypass Unity login screen with autohotkey
  - ps: .\Scripts\ci-windows-install.ps1

test_script:
  # run Unity in 'unit-test-mode', always fail, log at artifacts ( https://ci.appveyor.com/project/llafuente/unity-platformer/build/artifacts )
  - ps: .\Scripts\ci-windows-test.ps1
  - ps: >
      $wc = New-Object 'System.Net.WebClient'

      $wc.UploadFile("https://ci.appveyor.com/api/testresults/nunit/$($env:APPVEYOR_JOB_ID)", "C:\projects\unity-platformer\unit-test-results.xml")
```ps1

I left `on_finish` with blocking RDP connection, and if you enter & execute in powershell

```ps1
$env:Path += ";C:\Program Files\AutoHotkey"
Start-Process -FilePath "AutoHotkey.exe" -Wait -ArgumentList ('C:\projects\unity-platformer\unity.ahk')
C:\projects\unity-platformer\Scripts\ci-windows-test.ps1

You will see the Unity Login properly filled. And test ok

C:\projects\unity-platformer\unity.ahk is a copy of https://github.com/llafuente/unity-platformer/blob/master/Scripts/unity.ahk but contains user/password that are encrypted at Appveyor.yml environment.

Hope it helps and report is accurate enough :)

IlyaFinkelshteyn commented 7 years ago

Hello,

We are not familiar with AutoHotKey and cannot recall other customers successfully use it with AppVeyor. We have to investigate. However I believe that you may reach your goal with Microsoft UI Automation framework, as in this tool, which works OK on AppVeyor.

Thanks! Ilya.