appium / appium-mac2-driver

Next-gen Appium macOS driver, backed by Apple XCTest
Apache License 2.0
130 stars 25 forks source link

Allow set process id together with bundleID to activate app #310

Open LykashevichAndrei opened 4 months ago

LykashevichAndrei commented 4 months ago

In a situation where multiple applications with the same bundle identifier (bundleID) are running simultaneously, it would be convenient to have the ability to set the process ID (PID) to connect to the correct application. However, using the application path (appPath) is not always the best option, as this path can also be the same.

ketai4eg commented 3 months ago

I have a similar issue. We are using two different Python versions, and Appium can't resolve the path correctly. For example, the app is run using Python 3.9, but Appium continues to search for Python at /Library/Frameworks/Python.framework/Versions/3.12/Resources/Python.app. As a result, it's not possible to connect to the app.

KazuCocoa commented 3 months ago

Do you have any idea how to achieve it...? Current logic to launch an app is via https://developer.apple.com/documentation/xctest/xcuiapplication?language=objc , so I wondered how we could do it.

https://github.com/appium/appium-mac2-driver/blob/a196ee4a9abff8ae58bdf857e3165644cb7069b0/WebDriverAgentMac/WebDriverAgentLib/Routing/FBSession.m#L93-L100