appium / appium-mac2-driver

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

Opening desktop application and interacting #171

Closed naagf5 closed 1 year ago

naagf5 commented 1 year ago

I want to open a desktop application and check some labels text in it. I am using "Robot Framework " http://serhatbolsu.github.io/robotframework-appiumlibrary/AppiumLibrary.html#Activate%20Application

I am not getting any error but the application is not opened. Please help in opening the application using Appium.

For test purpose i want to open TextEdit application (It really helps if i wan to installed application like /Applications/VLC.app) Open Test Application2 Open Application http://127.0.0.1:4723/wd/hub automationName=mac2 ... platformName=mac platformVersion=11.6.1 ... appium:bundleId=com.apple.TextEdit showServerLogs=true

KazuCocoa commented 1 year ago

Can you share the Appium server's full log as GitHub GIST?

naagf5 commented 1 year ago

Thanks for the reply @KazuCocoa . My aim is to first open existing application and interact. Then do with the actual testing app. But the default is not working. Your help will means alot to me.

Here is full informaton

  1. Log generated at appium server https://gist.github.com/naagf5/b42189fd771419572f6e4e221ddb6ef1

  2. Log generated when run my test file (Mac.robot) https://gist.github.com/naagf5/e9ccb789810cd5c41ddec8e1548f0ce1

  3. The actual test file (Mac.robot) https://gist.github.com/naagf5/7698c8f83c1ef1cb60d9d758dfac4d00

I am using robotframework-appiumlibrary==2.0.0

NOTE: I did pre-requisites

  1. Xocde isntalled (Version 12.5.1 (12E507))
  2. I also added Xcodehelper.app under Accessiblity in security privacy.
KazuCocoa commented 1 year ago

Thank you.

What happen when you call /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild build-for-testing test-without-building -project /Users/vini/.appium/node_modules/appium-mac2-driver/WebDriverAgentMac/WebDriverAgentMac.xcodeproj -scheme WebDriverAgentRunner COMPILER_INDEX_STORE_ENABLE=NO on your env?

naagf5 commented 1 year ago

Here is the output of above command: https://gist.github.com/naagf5/48f3833c43079939dd6f3052320348b9

KazuCocoa commented 1 year ago

I see... Maybe, only the combination of Xcode 12 and macOS 11 has the error. Let me take a look if we could something https://github.com/appium/appium-mac2-driver/actions/runs/3502637962/jobs/5867157999

KazuCocoa commented 1 year ago

Maybe you need to update the Xcode 13 version if possible on macOS 11. On GitHub Actions, I found macOS 11.7 and Xcode 12 combination got the same error. https://github.com/appium/appium-mac2-driver/pull/173 while Xcode 12 and macOS 10.5 had no issue on my local. https://github.com/appium/appium-mac2-driver/blob/master/WebDriverAgentMac/WebDriverAgentRunner/WebDriverAgentRunner.m#L49-L51 is the root place. So, macOS 11.2 x Xcode 12 also should have no issue.

naagf5 commented 1 year ago

@KazuCocoa Thank you for the details. I will try to change the combinations and try. Thank you very much for the investigation and pointing me to the root cause. I will update you once i try after changing the combinations.

naagf5 commented 1 year ago

@KazuCocoa The below combination worked fine. Hence closing the issue. Thank you very much @KazuCocoa for you analysis and help. Xcode: Xcode 14.1 MacOS: 12.5.1