appium / appium-mac2-driver

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

Possible to connect to the running application by appium mac2? #165

Closed nguyenquangtay closed 1 year ago

nguyenquangtay commented 1 year ago

Hello. Context: due to the requirement, my application is started by script or auto opening after being installed ... (Not from Appium), I need to verify something that happens only by the first time (such as welcome text...)

Desired: Does anybody know how to connect to the running application?

Thank you in advance!

KazuCocoa commented 1 year ago

Did you try appium:bundleId?

The bundle identifier of the application to automate, for example com.apple.TextEdit. This is an optional capability. If it is not provided then the session will be started without an application under test (actually, it will be Finder). If the application with the given identifier is not installed then an error will be thrown on session startup. If the application is already running then it will be moved to the foreground.

https://github.com/appium/appium-mac2-driver#capabilities

https://discuss.appium.io/ may also help for such general questions

nguyenquangtay commented 1 year ago

yes, I've tried with the bundle_id but it closes my current running window, then reopen the new one(this one I can't test something happens at the first time opening, e.g: the welcome text after installed...) Do you have any other idea? Thank you!

mykola-mokhnach commented 1 year ago

Have you tried to set noReset capability to true?

nguyenquangtay commented 1 year ago

Sorry for saying the thank lately! I'm now able to connect/interact/merge: Appium driver, webdriver and apple script... once again, thank you all for your support!