Appium Tutorial 3: How to setup Appium on MAC for iOS | Real Device | Simulator
HTML-код
- Опубликовано: 8 сен 2024
- ENROLL to the BEST SELLER Appium course: www.udemy.com/...
The course will help you,
👉 Master Appium from beginner to advanced level
👉 Design and Implement production ready test automation frameworks using Appium + TestNG and Appium + Cucumber.
👉 Implement end to end CI/CD using local Appium server
👉 Integrate test automation framework with BrowserStack cloud and implement end to end CI/CD using the cloud
👉 Become mobile automation expert and boost your mobile testing career
Why this course?
==============
✅ This is one of the most comprehensive Appium course ever created online
✅ I have explained every concept in great details and with live coding
✅ No other online course covers iOS real device automation like the way I have covered
✅ We will be designing and implementing production ready frameworks using Appium + TestNG and Appium + Cucumber BDD
✅ We will integrate frameworks with other important tools like Maven, Jenkins, GitHub, Apache Log4J2, Extent Reports and so on
✅ This is the only course that covers end to end CI/CD implementation using Appium for both iOS and Android
✅ This is the only course that covers parallel execution on real Android and iOS devices
✅ We will be running the Appium framework on BrowserStack cloud and implement CI/CD using Jenkins
✅ We will be covering a lot of automation best practices and Appium tips and tricks throughout the course
Important topics covered
=====================
👉Introduction to Appium
👉JAVA Essentials
👉Setting up Appium environment on Windows for Android
👉Setting up Appium environment on MAC for iOS and Android
👉Creating our first Appium project
👉Native Apps automation
👉Appium Gestures using Touch Action API
👉Appium Driver Commands
👉WEBVIEW automation for Hybrid and Web (Browser) apps
👉TDD Framework design from scratch using Appium and TestNG
👉BDD Framework design from scratch using Appium and Cucumber
👉Complete CI/CD implementation from scratch for iOS and Android
👉Run Appium on BrowserStack cloud through CI/CD
👉Deep Links to improve speed and reduce test flakiness
Connect with me
==============
🌎 Email: askomdch@gmail.com
📝 LinkedIn: / omprakash. .
📂 GitHub: github.com/omp....
Some of the reviews from the course
=============================
**It's the best Appium course available in udemy. Om you have done a great job by choosing the content which is actually required to focus on and explaining those in the simplest way possible. I highly recommend everyone to enrol to this course. Well done Om!!!**
**I have completed the course and found that one of the best course in Udemy and most of other courses are incomplete and outdated information. Omprakash keeps the tutorials up to date. I'm very happy with the content and explanation. He is also very helpful and supportive, give quick response and resolve the issues.**
**So clear and easy to understand this course. Thank Omprakash so much.**
**Better Than Any 100000 course ! Thanks**
**Very helpful step-by-step tutorials! Every step is working as described Thank you for the detailed lessons.**
**The course was very detailed and very useful for learning from basics to in-depth concept about appium tool. Omprakash explained each concept with clear detailed explanations and examples too! This is the best Appium course available online Thanks a lot!.**
#appiumtutorials
Folks, if you face any issue, please review below issue list and their solutions:
1. If Appium doctor gives "Xcode is NOT installed" error even if XCode is installed, then most likely XCode command line tools are not installed under the correct path /Applications/Xcode.app/Contents/Developer
In that case, execute below command in the terminal to set the correct path -
sudo xcode-select -s /Applications/Xcode.app/Contents/Developer
You can omit "sudo" is you are an admin on the machine.
2. If you are using free developer account, the provisioning profile will be valid only for 6 days I believe (do let me know if you have a different observation). It will expire after that. In that case, you might have to rebuild the WebDriverAgent project using the same command which you executed previously i.e.
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id='udid' test -allowProvisioningUpdates
3. If you are using simulator and get this error "Building for iOS, but the linked framework 'CocoaAsyncSocket.framework' was built for tvOS + tvOS Simulator.
Testing cancelled because the build failed.", then use Appium Desktop version 1.17 or above or downgrade your XCode to 11.3 or 11.0. This issue occurs because Apple made a change in XCode 11.4 that broke WebDriverAgent installation on simulators. More info here,
github.com/appium/appium/issues/13996
forums.developer.apple.com/message/413743#413743
4. If you have both Appium Desktop and Appium CLI installed and if you are using a real iOS phone. make sure that you install the WebDriverAgent from the same Appium you are using. Meaning if you are using Appium Desktop, then make sure that you install WebDriverAgent from the installation path of Appium Desktop and not from the installation path of Appium CLI. Note that WebDrvierAgent installation path for Appium Desktop and Appium CLI are different.
Very well explained. I often forget the steps and this is very very useful. Keep up the good work!
Thank you for the kind feedback, Ade
Thanks a lot for this great tutorial. Its very useful, saved a lot of time for me.
A small correction at 2:45 in the video - while installing the Appium through command line - use "appium" instead of "Appium"
Yes I got it corrected in the description section
This Video has really helped me a lot I was struggling to configure this setup from past 2 weeks!! Thank you so much for keeping this video active for long!!
A very very big thankyou for this video, I have been struggling with the proper xcode configuration for appium on macOS from so long and even after watching thousands of videos, none of them worked for me but this. Thank you so much for explaning every single and trivial detail that finally I am able to launch my app today. Big Big Thank you!!.
@askomdch you are the best of the best. For three days I am trying to set up the environment to start testing. Thank you so much!!!!!!
Really one of the best video I have seen for appium ios testing . Could have given little explanation of each command used. However very good learning video for the beginner . Thank you so much for your time and effort.
Appreciate your feedback.
Excellent description. Its complete setup that we do in real time. Thanks
Excellent video with detailed instructions for Simulator and Real device configuration. Thank you so much Om, appreciate your time in this regard.
Thank you buddy
Great tutorial, I'm succeeded on using the appium inspect to start my automation script.
Hey awsm Explain.
Very good basic set up tutorial!
Thank you
Very good tutorial, it helped me to do a proof of concept to automate an already installed app on real device (without access to .ipa), using the app bundleId.
I really appreciate your videos. Thank you so much for them. This was really helpful. Very well explained and detailed. ... Greetings from Peru :)
Thank you for your feedback.
Thanks
Omprakash Chavan. This video was really helpful for my task. :) Keep making such nice videos.
Sure. Thank you for the feedback.
I did everything same , all went well, but in the end I am getting error "[XCUITest] Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65"
MacOS: 13.1
Xocde: 14.0
PLEASE HELP
Thank you Omprakash for this video!!!
Thank you for this tutorial, but in the latest version of xcode I get the following message when I try to build the project:
"Building for iOS Simulator, but the linked library was buit for tvOS + tvOS Simulator" and the build fails.
Please check the pinned comment.
Thank you so much Om, this was really helpful as you will not see any detail info like you have explained , good job.. :)
Appreciate your feedback!
Большое спасибо автору. Ваше видео оказалось наиболее полезным из всех что я видел!
Appium WebDriverAgent is not available in my Mac
Thanks alot for such detailed fine session. This is a huge help
Thank you
Helped me with my set up . Thank you so much
Thank you
Hello thanks for this Video!! I have a question , do we need to have a developer account or juste an Apple Id is enough? Thanks!
Thank you so much
Great job! Thank you so much, It's very helpful and my problem is solved.
Thank you
Omprakash Chavan Hi, for some reason I couldn’t get the page source of IntegrationApp or my App with both Appium Desktop and localhost:4723/wd/hub/session/SESSION_ID/source. Any idea? Thank you so much in advance!
What command are you trying and what's the error message you are getting?
Thanks Sir for the detailed set up video . It was really informative 👍
It was really an amazing video and really helped me a lot and many thank for your effort
Thank you for your kind feedback. Do checkout my complete playlist whenever you get time.
Thank You.
This video was really helpfulful. I really appreciate
Appreciate your work! Really helps a lot... Have learnt a lot from your videos...Thank you so much
Thank you for the kind feedback. Now I have a Udemy course for Appium that has a lot more learnings as compared to what we have here on RUclips. Here's the link with the coupon code: www.udemy.com/course/the-complete-appium-course-for-ios-and-android/?couponCode=9D6D1B
Thank youuuuu so much 😁😁😁😁😁😁😁😁😁😁
bro i dont know how to thank you 🙏 your will explain everything thank you keep going will ur good work and help others by sharing like this
Thank you for the kind feedback. Now I have a Udemy course for Appium that has a lot more learnings as compared to what we have here on RUclips. Here's the link with the coupon code: www.udemy.com/course/the-complete-appium-course-for-ios-and-android/?couponCode=9D6D1B
@@askomdch sure bro i will. take it
done taken bro :)
Detailed information, nice stuff
Thank you
Appium cloud is what in interviews are asked now-a-days, kindly provide video tutor on Appium cloud for setup and configure and execute and secondly challenges in cloud
Hi Simha, I have a full fledged Appium course that covers integrating automation framework with the cloud. Feel free to click the discounted link in the description section. With this link, you will get the course at the lowest possible price.
I'm wondering why -d folder is created when running one of the command
hello Om,
i am facing issue with keychain i tried multiple time but still its not accepting, may i know any other way or solution to solve this issue
Missing private key, that's what im getting on excite certificates , please help
Great video buddy, thank you so much for posting!!!
Hi Om, I have followed each and every step of your video till 21.52 secs completely but I am not seeing appium webdriver agent folder under node_modules ..any suggestions what could be the reason for that :) thanks in advance :)
You might want to refer this page: appium.io/docs/en/drivers/ios-xcuitest-real-devices/
@@askomdch Hi Sir, in codesign wants to access your Apple development @ 27:48 mins which password we have to enter like Apple id password or computer password ... thanks in advance for your reply and also how to get UICatalog.ipa file if possible could you plz share
@@dhullspd7390 your computer's login password
@@dhullspd7390 you will have to build uicatalog app for your simulator. I believe I have explained the steps in one of my video. For real device, you will need paid developer account to build an ipa.
Thank you for this video. Very clear and useful.
This video is very good and helpful 👍
HI Om am getting bellow error while trying run on iPad
Create directory 'PublicStaging/UICatalog.app''. Failed to receive any data within the 10000ms timeout
[warn] [35m[XCUITest][39m Falling back to 'ios-deploy' usage
I have build webdriveragent in iOS version 13.0 so there is derived data in developer/xcode/ and now I am running basically launching tha .app file on iOS 15.4 but still my app is launching on 13.0. where I am going wrong i am expecting that app should launch on 15.4. please help.
hi, can you pls help me with UICatalog.ipa file
Hi sir I am facing issue to run xcodebuild - showsdks... Is it any other way to get info
Cool video. Many thx :)
Where command doesn't work, but which is the correct command.
npm install -g Appium -> appium should be lowercase, otherwise doesnt work
Thanks for pointing this out. I have corrected the "npm install" command in the description. Also "where" should work to get the installation path.
@@askomdch Something more which I think would be amazing, if you'd explain the commands you're executing, e.g. this one: mkdir -p Resources/WebDriverAgent.bundle
./Scripts/bootstrap.sh -d
@@istvan368 Sorry mate, this is Apple thingy (I might have to create separate video just to explain this command :-) ), even Appium guys didn't bother to explain in detail except mentioning that it sets up the project - appium.io/docs/en/drivers/ios-xcuitest-real-devices/
@@askomdch I see, I would watch that video for sure. :) Btw what steps should I do again, if I want to run tests on another iPhone?
@@istvan368 1. Build and install WebDriverAgent on your iPhone 2. Register your phone's uuid on the provisioning profile of your app (if the app is built using developer cert)
FYI, at 24:33, When I select Team > Provisioning Profile is shown as "None Required"
Hello, Omprakash Chavan! Thank you so much for sharing your lecture! It's truly helpful! But do you have a link that I can download the (UICatalog) IPA file by any chance? I am trying to test with IPA file but I have trouble with looking for one. I would appreciate if you can please reply me ! :)
github.com/appium/ios-uicatalog
For real device, you will have to generate the IPA by following the code signing process. For simulator, you can create .app and use it.
@@askomdch Is there any specific way or best practice that would you like to recommend? or any link to generating process would be really appreciated. Thank you! :)
Just code sign the app using XCode just like how you would do for WebDriverAgent project and then run it on the device. Just remember with free account you cannot distribute the app for installation on other devices.
Really helpful, thanks alot :)
Thank you
Thank you This helped me
hi sir nice video.. I am learning much from this.... I have 1 query , in Appium-desktop version 1.7.1 for Mac , appium-WebDriverAgent
folder is not present at above location as u have updated, is it updated to some other name? pls let me know. thanks , I have already
shared this video to my friends.
Looks like this is happening on latest version. Couple of people reported this issue. I think you need to check under this folder /lib/node_modules/appium/node_modules/appium-webdriveragent. Let me know if this works for you. I'll update the pinned comment accordingly so that others would know.
@@askomdch I am not able to find at given location.
If you are using Appium Desktop, you need to right click on it and then navigate to the folder as shown in the video.
/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent
@@askomdch Thanks sir got it..its hidden not directly visible, so I used command mdfind -name WebDriverAgent
it searched.
And this:
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
:(
Thanks for the well explained video. I followed the same steps as mentioned by you, however I am getting following error. Could you please help me out to fix this
node -v
v13.12.0
npm -v
6.14.4
appium -v
1.17.0 … also tried on 1.17.1-beta.0, 1.16.0 and 1.16.0-beta as suggested in some place
Command :
xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=XXXXXX' test -allowProvisioningUpdates
Testing failed:
Building for iOS, but the linked framework 'CocoaAsyncSocket.framework' was built for tvOS + tvOS Simulator.
Testing cancelled because the build failed.
** TEST FAILED **
@Namita, it seems Apple made a change in XCode 11.4 that might be giving you this error. You might have to rollback to previous version 11.3 or 11.0 until this issue is fixed/ handled by Appium. Refer this link for more details: forums.developer.apple.com/message/413743#413743
You can try to install Appium beta as suggested in this link. Please run the uninstall command and then run the install command as mentioned in the link. Also after reinstallation, reload WebDriverAgent project in XCODE and then run the command in the terminal. If it doesn't work even after that, you might want to add your comments in the issue so that Appium team know about it. github.com/appium/appium/issues/13996
@@askomdch Installed Appium Desktop 1.17.0 and that solved the issue. Thanks.
Nice to know. Will add this as a troubleshooting step in the pinned comment.
@@RahulYadav-fq5bu OH great Thanks will try this. Thanks you so much for responding.
Hi Om,
I have new question with understanding perspective : How does this WebDriver acts once installed successfully ?
Suppose now, as I already have built WebDriver agent ( from Appium CLI path) and I dont see it is returning back to root/originating path on terminal window ( stays at "WebDriverAgentRunner-Runner[455:44296] Using singleton test manager" and looks like session based event ) so I hope even if I close my machine and keep WebDriver installed on that particular real device as it is, it will support Appium testing on valid and signed app till the time there are any further updates required in either Appium or WebDriver itself ? OR I have to always use that build project using xcode and master command in terminal, whenever I turn on machine and need to start automation?
Also now, if we refer back to your saucelab app video for running test on simulators, I will have to build the same WebDriver xcode project ( may be I will consider Appium desktop path?) but just make sure about connected simulator and select destination as your connected simulator, following up with build project and running that master command again to install WebDriver on simulator.
As long as I don't change destination simulator or again if there are no updates or dependencies for this, hope it will work to support with any valid app automation without building it again and again.
Summary :) In all, this WebDriver agent building is kind of just one time activity per connected destination devices and can support any valid/signed app testing until it is required to be updated for any reasons.( No need to keep that terminal session with progressive automation run)
Yes installing WebDriverAgent is one time activity unless you are upgrading Appium server in which case you will have to do the same changes in the WebDriverAgent project and run the same terminal command again. Also if you are using free apple developer account, then I believe the automatic provisioning profile will work only for 6 days after which you will have to run the command again (with paid account, you would use your own provisioning profile to code sign WebDriverAgent, so there is no question of expiring provisioning profile).
Also for simulator, you don't really have to code sign WebDriverAgent. Appium will install it directly without code signing, you don't have to do anything as explained in my video.
Thanks Om, that explains. I won't do anything for simulators then.
This is useful... Thanks for the info.. do we need to have admin/root access in Mac to setup appium for iOS devices?
Yes
@@askomdch thank you so much.. I appreciate all the good work you are doing for students like me...
Thank you. You might want to explore the in depth Appium course that I have created on the Udemy platform. It covers many more topics and is structured. Check out the description section of this video for the course link.
@@askomdch thank you sir...I am going through it...
how i get UIcatalog app ? plz
Great stuff 👌👌
Thank you
Thank you for sharing. But you can tell me you used Paid account IOS dev or free account? I use free account and get some errors.
I used free account.
Hey Omprakash Chavan, nice tutorial!
Can I automate using a real device without paying for the developer account?
Unfortunately you cannot because Apple requires registering the device on the provisioning profile of the app which can be done only if you have a paid account. But you can very well automate any app store app since it's distributed for public use, only thing is you cannot automate the process of installation.
I have Some questions ¿¿¿
after running mkdir - p Resources/WebDriverAgent.bundle./Scripts/bootstrap.sh -d
getting this error: mkdir: Resources/WebDriverAgent.bundle./Scripts: No such file or directory
same
@askomdch I followed your steps and everything setupped properly but in my case when I do start session from "appium inspector" I am getting error which is Error: "Failed to create session. An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: xcodebuild failed with code 65 xcodebuild error message:" so can you please help to figure this out
Hello Amit Brother I'm getting same error brother, did you find any solution? Please do help me brother 🙏
@AmitShah-mn4xs brother please help me
I followed every step and my build failed at 28:55, with below error, Please help! [I am running on actual device - iPad]
Failing tests:
WebDriverAgentRunner:
-[UITestingUITests testRunner]
I went to Window > Devices and Simulators > Under ERRORS AND WARNINGS, it dispalys
Failed _shouldMakeReadyForDevelopment check even though device is not locked by passcode.
Check this: stackoverflow.com/questions/61522527/xcode-device-issue-failed-shouldmakereadyfordevelopment-check-even-though-dev
can I just run the test cases on an already installed app in my phone?
Yes
Hi Om, you installing appium doctor using node. As I am using appium desktop, suggest how to install appium doctor without using npm. i am getting error appium doctor not found
I believe node and npm is needed to install appium-doctor.
@@askomdch Thanks for your reply .. As I am gonna use the appium server through appium desktok, is it necessary to install node
Node is not needed for Appium Desktop as it comes bundled with it.
Hi Om
I am getting below error Testing failed:
Hi Om,
I don't see "appium-webdriveragent" folder inside node_modules, what is the solution for this? and how do i proceed further? please help me on this
Looks like this is happening on latest version. One more person faced this issue. I think you need to check under this folder /lib/node_modules/appium/node_modules/appium-webdriveragent
Also let me know if this works so that I can update pinned comment for others.
If you are using Appium Desktop, this is the location:/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent
So I am trying to install the WebDriverAgentRunner on a real time device which is at OS 14.1. The build gets succeeded in Xcode but when I execute the command xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=' test , the test fails. The error being @t encountered an error (Failed to establish communication with the test runner.
Xcode is 11.3, Appium is 1.71,1, phone OS is 14.1
Reboot the device and then try. You might have to reboot the Mac as well.
@@askomdch i did that but still not able to install it
Hi, Do you have details on how to get the simulator working when the user has developer profile? I tried the same commands, but it doesn't launch the app. It launches 'Hello WOrld' form - which is basic of new Xcode, but even after killing it, the app doesn't launch the way it should, it launches hello world form only. Can you help?
The app I created in the video will launch Hello World form only. It's the quickest way to validate if Appium is able to connect to the simulator. As long as it's happening, there is no issue. You can basically start automating your app from there.
Not sure if the question was clear. I am unable to launch my app. I don't want to automate 'Hello World'. So, if you have any details on how to get the valid app run on simulator that will help. How to get the app installed which is different than 'Hello World' also if any quickest way to get the app installed via appium with provisioning profile, that will help. Thanks! I have watched few videos and appreciate the detailing. Android was easy to gey through. Stuck with iOS. Thanks!
Build your app for the simulator exactly the way I built Hello World app. It will create the .app file. Provide path to this file in the "app" Appium capability. Appium will then install the app automatically. Appium doesn't need to know the provisioning profile in order to install the app on Simulator. Provisioning profile is needed for real device to be able to install and use the app on the devive. Also for simulator l you don't need a developer account as well. Basically just build the app for your simulator and all the required commands are in the video. I hope this clarifies your query.
Even if the app has provisioning profile set and you are using developer account, just build the app for the simulator by keeping all your settings intact. Once .app file is created, then provide the path in the Appium capability and then everything will be taken care of.
Hi! I have a problem with command "where":
-bash: where: command not found
try "which" instead.
hello sir, build failed after hit the command "npm install -g ios-deploy" ... any solutions?
What's the error you are getting?
@@askomdch
The following build commands failed:
Ld /usr/local/lib/node_modules/ios-deploy/build/ios-deploy.build/Release/ios-deploy.build/Objects-normal/arm64/Binary/ios-deploy normal arm64
Hi Guys,
Im facing one issue please help me
After giving this command brew install node
this error is getting in terminal
Error: Can't create update lock in /usr/local/var/homebrew/locks!
Fix permissions by running:
sudo chown -R $(whoami) /usr/local/var/homebrew
Error: The following directories are not writable by your user:
/usr/local/lib/python3.7/site-packages
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew/locks
You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/lib/python3.7/site-packages /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew/locks
INLaptop97:~ sai$ brew install node
Error: Can't create update lock in /usr/local/var/homebrew/locks!
Fix permissions by running:
sudo chown -R $(whoami) /usr/local/var/homebrew
Error: The following directories are not writable by your user:
/usr/local/lib/python3.7/site-packages
/usr/local/share/zsh
/usr/local/share/zsh/site-functions
/usr/local/var/homebrew/locks
You should change the ownership of these directories to your user.
sudo chown -R $(whoami) /usr/local/lib/python3.7/site-packages /usr/local/share/zsh /usr/local/share/zsh/site-functions /usr/local/var/homebrew/locks
Looks like permission issue. You don't seem to be an admin on the Mac. Try making yourself admin and then try.
@@askomdch okay thanks for the response
At 31:34, as I click Start Session, I am getting below error,
An unknown server-side error occurred while processing the command. Original error: Could not create simulator with name 'appiumTest-', device type id 'CAREDeviPad', with runtime ids 'com.apple.CoreSimulator.SimRuntime.iOS-13-6'
Any thoughts please?
Looks like you are using device name instead of device udid. Please check.
@@askomdch I have added all desired capabilities similar to shown in the video. My device name is CAREDeviPad and my device UDID is 859ea866b65588660c2e597984fb14e43a8a034d
@Omprakash Chavan , thanks for this video.
I am getting error when inspecting elements.
[IXcode] WebDriverAgentRunner-Runner[5511:109292]
n I exec [XCUIScreen screenshotDataForQuality: rect: error:]: unrecognized selector sent to
being @ instance ®x28047b5c0
LEXcode.]
Hi Om, I have a question. The cerficate that you use in your application in xcode and the certificate in the webdriveragent should be similiar? Thanks 👍
Nope, the certificates need not be same. You can use entirely different Apple developer account for WebDriverAgent.
@@askomdch Alright. Thanks for your reply Om!
@@askomdch Hi Om, are you familiar with this kind of error? I encountered this error while installing the webdriveragent to the real device. Thank you!
Test session results, code coverage, and logs:
/Users/ainandominguez/Library/Developer/Xcode/DerivedData/WebDriverAgent-akxhdiizyykdxefsthlnfyomlaiz/Logs/Test/Test-WebDriverAgentRunner-2020.06.04_17-58-57-+0800.xcresult
Failing tests:
WebDriverAgentRunner:
-[UITestingUITests testRunner]
** TEST FAILED **
Please share complete logs. Also check if you have trusted WebDriverAgent on the phone.
@@askomdch Yes Om I already trusted the WebDriverAgent on my phone. Here is the complete log. Thanks for your fast response, I appreciated it very much.
Test Case '-[UITestingUITests testRunner]' started.
t = 0.00s Start Test at 2020-06-04 18:43:54.507
t = 0.00s Set Up
2020-06-04 18:43:54.508402+0800 WebDriverAgentRunner-Runner[380:23998] -[UITestingUITests internalImplementation]: unrecognized selector sent to instance 0x2821350e0
t = 0.02s Assertion Failure: :0: failed: caught "NSInvalidArgumentException", "-[UITestingUITests internalImplementation]: unrecognized selector sent to instance 0x2821350e0"
Test Case '-[UITestingUITests testRunner]' failed (0.018 seconds).
Test Suite 'UITestingUITests' failed at 2020-06-04 18:43:54.525.
Executed 1 test, with 1 failure (1 unexpected) in 0.018 (0.048) seconds
Test Suite 'WebDriverAgentRunner.xctest' failed at 2020-06-04 18:43:54.525.
Executed 1 test, with 1 failure (1 unexpected) in 0.018 (0.049) seconds
Test Suite 'WebDriverAgentLib.framework' started at 2020-06-04 18:43:54.526
Test Suite 'WebDriverAgentLib.framework' passed at 2020-06-04 18:43:54.526.
Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
Test Suite 'All tests' failed at 2020-06-04 18:43:54.526.
Executed 1 test, with 1 failure (1 unexpected) in 0.018 (0.050) seconds
2020-06-04 18:43:54.540 xcodebuild[34849:1238240] [MT] IDETestOperationsObserverDebug: 4.768 elapsed -- Testing started completed.
2020-06-04 18:43:54.540 xcodebuild[34849:1238240] [MT] IDETestOperationsObserverDebug: 0.000 sec, +0.000 sec -- start
2020-06-04 18:43:54.540 xcodebuild[34849:1238240] [MT] IDETestOperationsObserverDebug: 4.768 sec, +4.768 sec -- end
Test session results, code coverage, and logs:
/Users/ainandominguez/Library/Developer/Xcode/DerivedData/WebDriverAgent-akxhdiizyykdxefsthlnfyomlaiz/Logs/Test/Test-WebDriverAgentRunner-2020.06.04_18-43-48-+0800.xcresult
Failing tests:
WebDriverAgentRunner:
-[UITestingUITests testRunner]
** TEST FAILED **
Hi, need some help how to reach out you
hello Omprakash Chavan can help me with this error:
Testing failed:
Building for iOS, but the linked and embedded framework 'YYCache.framework' was built for iOS + iOS Simulator.
Building for iOS, but the linked and embedded framework 'CocoaAsyncSocket.framework' was built for iOS + iOS Simulator.
Building for iOS, but the embedded framework 'CocoaAsyncSocket.framework' was built for iOS + iOS Simulator.
Building for iOS, but the embedded framework 'YYCache.framework' was built for iOS + iOS Simulator.
Testing cancelled because the build failed.
Please check the first comment.
@@askomdch I got this error while trying to use Xcode 11.3, my iPhone running iOS 14.3. Pls help me with!
Recovery Suggestion: This iPhone 7 Plus (Model 1661, 1784, 1785, 1786) is running iOS 14.3 (18C66), which may not be supported by this version of Xcode. An updated version of Xcode may be found on the App Store or at developer.apple.com.
Yes please update XCode to latest. Also Appium to latest and then try.
@@askomdch I'm using latest version of Xcode 12.3 and latest version of Appium 1.19.1
After running: xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=' test
Still got the error as the first comment, any other way to fix it, pls help me.
@@askomdch thank you, I did it, I downgrade to Xcode 12.2 and
I change: "WebDriverAgent -> Build Settings -> Build Options -> Validate Workspace = Yes" then it works
bro after trying "npm install ios-deploy" and i am getting this error please help
pdated 1 package and audited 730 packages in 8.655s
20 packages are looking for funding
run `npm fund` for details
found 250 vulnerabilities (2 low, 248 high)
run `npm audit fix` to fix them, or `npm audit` for details
saiswaroop@Sais-MacBook-Pro ~ % ios-deploy -c
zsh: command not found: ios-deploy
saiswaroop@Sais-MacBook-Pro ~ %
Hi Om, I have tried steps to install WebDriverAgent on device , it got installed , build got successful and even trusted app from device settings. However When I run the command " xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=fa......' test " again , it gives following error
Testing failed:
WebDriverAgentRunner:
WebDriverAgentRunner-Runner.app (897) encountered an error (Failed to load the test bundle. (Underlying error: The bundle “WebDriverAgentRunner” couldn’t be loaded because it is damaged or missing necessary resources. The bundle is damaged or missing necessary resources. dlopen_preflight(/var/containers/Bundle/Application/37481FD7-314A-4286-BD36-C1F71FCDC67B/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/WebDriverAgentRunner): no suitable image found. Did find:
/var/containers/Bundle/Application/37481FD7-314A-4286-BD36-C1F71FCDC67B/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/WebDriverAgentRunner: code signature invalid for '/var/containers/Bundle/Application/37481FD7-314A-4286-BD36-C1F71FCDC67B/WebDriverAgentRunner-Runner.app/PlugIns/WebDriverAgentRunner.xctest/WebDriverAgentRunner'
))
I tried to find something on it but did-not get any concrete resolution. It keeps on failing with same error.
Check this out and let me know what solution worked: github.com/appium/appium/issues/13890
To me it sounds like the solution is to upgrade iOS version on the device to 13.4 or higher. Apple keeps on breaking things with every new release :(
If this works for you, do let me know so that I can add this in the troubleshooting steps in the pinned comment for others.
Hi Om,
Yes , Thanks. I was about run the same with 13.5 in fact and did that today. I had 13.5 OS update pending on my device last night, downloaded and install it on device.
Additional step, we should recommend is that to update XCODE also to "Version 11.5 " which specifically says support about iOS 13.5, otherwise build creates issues majorly with destination device compatibility or can create issues with other missing dependencies that gets downloaded with new xcode updates.
Now, once both device and Xcode are up to date, select destination device as your connected real one and clean / rebuild the project. And then run that master command. The output after running command is as follows
2020-05-25 16:56:24.876655-0500 WebDriverAgentRunner-Runner[455:44149] Built at May 25 2020 16:55:50
2020-05-25 16:56:24.900711-0500 WebDriverAgentRunner-Runner[455:44149] ServerURLHere->192.168.0.7:8100
Hi Omprakash when i am giving xcodeproj -scheme WebDriverAgentRunner -destination 'id=BA6C0AF7-0991-4E3A-A523-63EE936A3ACB’test -allowProvisioningUpdates
on my appium-WebDiveragent terminal i am getting a new line as Quote is it okay? or i shud get something else?
@bes qa, It's not okay. Also the command should be xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination id='BA6C0AF7-0991-4E3A-A523-63EE936A3ACB' test -allowProvisioningUpdates
Please pay attention to spaces and special characters.
Also make sure the udid is correct.
Also you can always refer this page for the command and other details - appium.io/docs/en/drivers/ios-xcuitest-real-devices/
When I use the appium-doctor --ios, there is an error for Carthage was NOT found; how to install this Carthage in IOS? Thank you
In terminal, execute this command "brew install carthage"
@@askomdch Thanks, I was able to run the web driver agent for my iPhone XR and received Test Case msg in terminal but when I try to start the session using the Appium and providing the DesiredCapabilities, I got the error below in the Appium log. What is the issue here when trying to run the UIKitCatalog.app in iPhone XR? Thank you.
"Encountered internal error running command: Error: Real device architecture is unsupported by the '/Users/**laptop name**/Desktop/UIKitCatalog.app' application. Make sure the correct deployment target has been selected for its compilation in Xcode"
.app is built for simulator. It cannot be run on a real device. For that you will need to build the app for real device using your developer account. You will need to select your team id, provisioning profile and install the app using XCode. Also note that with free developer account, you cannot distribute the app i.e. you cannot generate an ipa. You can do that with paid account.
@@askomdch noted. so UIKitCatalog.app does NOT work on real ios device , whereas exercises from Android (ApiDemos-debug.apk) can be used in a real Android device..I just want to confirm, I learned so many things from your Appium lessons. Thank, and good day.
Correct.
Can you open subtitles ?
Just now enabled. RUclips will take some time to generate. Will update you.
@@askomdch Thank you
Simctl error running ‘create’ : invalid device type
Can you please help me in this error while starting the session in appium
Please share the capabilities you are sending to Appium server. Also make sure you are using correct device name and device udid.
niv
ce
Thanks 👍