appium / appium-for-mac

[deprecated] Application for automating a mac app with JSON wire protocol
Apache License 2.0
193 stars 70 forks source link

Automatic AXPath recording in virtual environment #85

Closed miksch123 closed 4 years ago

miksch123 commented 4 years ago

Hello,

First of all I am floored by this driver and its capabilities. It really gives people a tool to get going in automation for Mac.

One question I have though is around automatic AXPath recoding in a virtual environment like virtual box. Do you know if this function is available there?

Many thanks for the work put into this.

miksch123 commented 4 years ago

Due to the fact that I have found a way of using AFM on a Virtual environment and am basically able to locate the element inside the VM I will close this issue.

The way I went with was to enable the accessibility keyboard inside the VM. When I then want to locate a specific element I move the accessibility keyboard near the element and press the fn key followed by a swift mouse move to the desired element. The slight delay that appears to happen before AFM finally finds the element and puts it into the clipboard helps very much in that regard.

As a side note: the FN key will lock in place so as soon as the element was found you need to press the fn key again to release it.

I am sure the "solution" I came up with is not the most efficient one, but it still helps.

miksch123 commented 4 years ago

I would have another option (if those can work for you). You can try to activate the accessibility keyboard press the fn key once (make sure the fn key has that red glow when you hove over it.) Then the initial inspection action got triggered. To get the path of the element you like to have you need to move to the element and then press the ctrl key of your physical keyboard. This has worked for me for Virtual Machines in VMWare and Virtualbox through various connections like VNC or Chrome remote desktop. Hopefully this is of any help for you.

I know that it might not be the solution you are loking for but it might be a good workaround