Skip to content

2.5. Windows Connection

!!! Note Before embedding the window, please minimize other irrelevant windows and keep only the AirtestIDE and the window to be tested in an active state on the desktop. If an exception occurs when you are connecting to a Windows window using the embedded mode, such as clicking becoming ineffective after embedding, or the software reporting an error during embedding, please switch to the non-embedded mode.

1.Connecting Windows Using Embedded Mode

image

  • Click the "Select window" button, and AirtestIDE will enter the window selection mode.
  • As the mouse moves, a thin green line frame will select the window corresponding to the mouse position in real time.
  • Once the green frame moves to the target window, embed it by left clicking the mouse.

Note: While in the state of window selection with the green frame, you can press the Esc key or right click to exit the state. If it is difficult to select the window to be tested, you can first minimize other irrelevant software on the desktop, activate only AirtestIDE and the window to be tested, and then establish the connection. This can improve accuracy.

2.Connecting Windows Using Non-Embedded Mode

Due to different implementation methods, some desktop software may have abnormalities after being embedded, such as clicking failure after embedding and reporting errors during embedding. In this case, you can try using the "Windows Non-embedding Connection" solution and the steps are as follows: image - Dropdown menu "Settings" - "Options" - "Device". - Check the "Connect windows without embedding" option, as shown in the figure: image - After saving the settings, perform the window connection operation again by clicking the Selected Window button and use the green frame to select the window to be tested. Then the window will not be embedded in the IDE and can be operated normally.

  • Clicking on "Window List Selection" will bring up the current window list.
  • Select the target window and confirm to proceed embedding it. (Subsequently, the game screen needs to be selected.)

4.Running Scripts in Windows Mode

After connecting to a Windows window in AirtestIDE, the handle of this window will be used to run the script. That is to say, after clicking the Run Script button, the command line displayed in the log window will show the words of --device Windows:/// followed by a string of numbers. Once this Windows window is closed, the handle will change when it is reopened, and so will the command line. If you need to run the script manually using the command line, please refer to the relevant section in the Running Script chapter.

5.Common Issues with Windows Connection

!!! Note The Windows mode is still under development. And you are welcome to give any suggestions by submitting an Issue.

5.1 Snapshot error during dual-screen recording

Please set the main screen to the left screen and align the top edges of the two displays in "Control Panel"-"Display"-"Screen Resolution": image

5.2 Snapshot stuck during recording

When manually recording a script, after selecting the image area, you need to double click to complete the image selection.

5.3 How to display the Windows window

  • Closing the IDE will trigger the window to pop up.
  • Click the shortcut button on the title bar of the device screen window to display the window. image

5.4 Unable to change the size of the embedded Windows window embedded

As the resolution needs to be recorded when captureing a snapshot of the Windows window, the size of the window cannot be modified after embedding it into the IDE. If the embedded window is too large, adjust the window to a suitable size before embedding it.

5.5 Click failure occurs when running the script on Windows

If there is a click failure when running the script on Windows, with the following error message, try closing the IDE, and then reopen it with administrator privileges. image