For new versions here is the path of WebDriverAgent for Appium Desktop: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent For Appium installed through node: /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent
Hi Ragav, your this video pulled me out of iOS setup for which I was struggling from weeks. You are the Best. Thanks for your hard work behind this to make understand people who want to get into automation.
Hello! Thank you for the video, it was useful for me. But since then following has changed: 1) location: /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent 2) no need to run ./Scripts/bootstrap.sh -d for appium > 1.20 3) 'instruments -s devices' deprecated in Xcode 13, instead use 'xcrun xctrace list devices'
Thank you for this video! There is a typo in the vid & notes: For Appium Installed through node /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WedDriverAgent WedDriverAgent should be WebDriverAgent
Hello, I would like to ask how to initialize the WebDriverAgent in Appium 1.21 version as the directory of WebDriverAgent cannot be found in appium-xcuitest-driver. Thank you very much
Hi Raghav, I am using macOS in virtual box (Big Sur). Inside Appium-xcuitest-driver folder, I can see index.js, package.json, README.md, LICENSE, lib, build. I could find the WebDriverAgent in the given location, please advice.
Hi, For new versions here is the path of WebDriverAgent for Appium Desktop: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent For Appium installed through node: /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent
Your entire video was very very useful to me, Thank you very much for sharing this video. With the help of this video I managed to solve one blocker issue in setup. Keep it up.
what to o if all 8 steps was successfully done but next step not? I cant find WebDriverAgent folder when I put path For Appium Desktop. Plus when I run ./Scripts/bootstrap.sh -d it is says 'no such file or directory'. Thanks for answer!
Hi Raghav, I have a few doubts related to mobile automation, Could you please respond if possible, 1. I have a Windows machine and Can I automate iOS apps from Windows machines. 2. Is it possible using an emulator? 3. Can I automate OS independent code? Means If I do the automation on Windows then Can i run it on MacBook? and vice versa.
Hi Rahul, 1. If you want to use a real, local device, then No, you will need a Mac OS for iOS testing, But if you can use remote platforms and infrastructure, then can be done from Windows 2. Yes you can 3. You can, will need to add some conditional statements are few places based on os
Hello Raghav. First of all thanks for the tutorial. It is very helpful. You explain very well. However I have a question. When we execute webdriver test, (xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=***' test) it seems to be stuck with 'Using singleton test manager'. It seems many people face it but there is no solution to all the Q in the internet. Do you have Any idea ?
@@ankurvarshney1862 Hello, No i din find any solution but i think there is no impact in using WebDriverAgent. I still have that error but I have successfully created my test framework.
@@Dua958 Yes, I am also able to carry out testing. But sometimes facing issues wile locating elements with Appium inspector. App screenshot on Appium inspector doesn't load
Hi Raghav, Our scenario is that we want to run the test from host windows machine and connect to real Mac devices. We were trying with Mac2driver but unable to connect to device. Do you have any video for the same and also if we want to run these tests in pipeline that what kind of host is needed? Please suggest
RS For the issue with Mac2Driver, it might be due to some configuration or compatibility issues. You can check the official documentation or community forums for potential solutions To run these tests in a pipeline, you would need a Continuous Integration/Continuous Deployment (CI/CD) environment. Jenkins is a popular open-source tool that can be used for this purpose You can also use GitHub Actions for running your tests.. The host machine should have the following basic requirements for the Appium server[^10^]: - A macOS, Linux, or Windows operating system - Node.js version in the SemVer range ^14.17.0 || ^16.13.0 || >=18.0.0 - npm version >=8 ..
Hello Raghav, I am following your vedios and those are very easy to understand. Thank u for sharing your knowledge. Raghav I want to connect a real ios device on my Mac for appium framework. So which vedio should I refer. Can you please guide me Thanks in advance
Hi Syed, see if this helps 1. Unlock mobile device 2. Open CMD 3. Run command : adb devices 4. Run command : adb shell 5. On mobile store open the app that you want to check 6. Run command : dumpsys window windows | grep -E ‘mCurrentFocus’ 7. appPackage and appActivity name will get displayed. Copy from here www.automationtestinghub.com/apppackage-and-appactivity-name/
Thanks for this amazing video sir. But do we required Mac OS to create mobile automation script for IOS? adn do we required two different setups for android and ios?
Hey Raghav, is it like we need to register our device udid somewhere linked to our apple id? Is paid apple profile is required for profiling purpose or we can use free apple profiles too?
Hi Jaya, you should be able to use the free apple id. On device, you just need to trust connection and have uiautomation enabled. pls check appium.io/docs/en/drivers/ios-xcuitest-real-devices/
@@RaghavPal it says to go to "Settings => General => Device Management " on the device, but there is no 'Device Management' under Settings-General. Please advise.
@@RaghavPal I got it working by following steps here: stackoverflow.com/questions/39603667/failed-to-create-provisioning-profile Specifically, after connecting my phone, selecting it from XCode menu Project -> Destination -> (selected my device)
Thanks Raghav, this is very detailed. I wonder, have you found any easy way to do this set up, seems like a lot of steps just to have Appium linked with the device. Thanks again!
Hi Jorge, yes, with mac setup there is a bit longer process, As of now I believe this is the way, In case I get any updates will update in video description
Hi Raghav, I was trying to set up xcode the way you have shown in the video, but it shows build failed whenever I am trying to perform buid. I have searched on google but couldn't find any solution which can resolve this issue. Can you please help in that.
Hi Anchal, It sounds like you are encountering an issue with building your Xcode project when using Appium on a MacOS machine. There could be a few reasons why this is happening: Try cleaning your build folder and delete derived data Try to re-install Appium, if the issue still persist You can also try to check your system logs, sometimes there may be some issue with permissions If you still facing the same issue, you can try to update your xcode to the latest version, it might help.
Hi Raghav can u plz guide us how to upload any file with the help of appium.it would be really helpful.i tried lot but not able to perform any file upload scenario
Hi Raghav , thank you for this video. I am not able to sign-in with a profile, but my Xcode build is successful and launches IntegrationApp to simulator. Also, when I run my test automation, I am getting the following error- Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'Scripts/bootstrap.sh -d' exited with code 1
I'm unable to access the WebDriverAgent on my mac, both installed Appium using npm and the Desktop version however was still unable to locate the WebDriverAgent Directory
Hi Enyinnaya, The WebDriverAgent is a component of Appium that provides a server for running WebDriver tests on iOS devices. If you're unable to locate the WebDriverAgent directory, there are a few steps you can take to resolve this issue: Check if the WebDriverAgent was installed correctly: The WebDriverAgent is typically installed as part of the Appium setup process. If the installation was unsuccessful, you may need to reinstall Appium or the WebDriverAgent. Check your Appium version: The location of the WebDriverAgent directory may be different depending on the version of Appium you're using. Make sure you're using the latest version of Appium and check the documentation for information on the location of the WebDriverAgent directory. Check the Appium logs: If the WebDriverAgent is not starting or is not working as expected, you can check the Appium logs for information on the issue. The logs may contain information that can help you diagnose and resolve the problem. Check the Xcode version: The WebDriverAgent is built using Xcode, so you will need to have a compatible version of Xcode installed on your Mac. Make sure you have the latest version of Xcode installed and check the Appium documentation for information on the minimum required version. Rebuild the WebDriverAgent: If the WebDriverAgent is not working as expected, you can try rebuilding it using the following command: ./Scripts/bootstrap.sh This command will rebuild the WebDriverAgent and may resolve any issues you're encountering. Note: These steps should help you resolve most issues related to the WebDriverAgent. If you continue to experience problems, you may want to check the Appium forums or ask for help on Stack Overflow for additional assistance.
I followed your mention steps but I am facing below issue - Error getting screenshot: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up. Can you please help me to resolve this issue. please
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
hii I have below error once press on build ( what done here in 24:05 ) ld: cannot link directly with 'XCTAutomationSupport' because product being built is not an allowed client of it clang: error: linker command failed with exit code 1 (use -v to see invocation)
Islam Can try these: 1. Xcode Version 14 or Later: - Update Appium Server: Ensure you're using the latest Appium version (2.0 or later) which has a fix for this issue. - Install Latest XCUITest Driver: Run `appium driver install xcuitest` or `appium driver update xcuitest`. - Use Prebuilt WDA: If updating Appium isn't feasible, download the prebuilt WebDriverAgent (WDA) and use the `usePrebuiltWDA` capability in your test scripts. 2. Missing or Incorrect Framework Linking: - Check Linked Frameworks: In Xcode, verify that "XCTAutomationSupport.framework" is listed under "Linked Frameworks and Libraries" in the "General" tab of your project settings. - Manually Add Framework: If it's missing, add it manually. - Embed Framework: If it's already listed, change its "Embed" setting to "Embed & Sign". 3. Xcode Signing Issues: - Clean and Rebuild: Clean your project (Product > Clean Build Folder) and then rebuild. - Verify Signing: If you're using custom signing profiles, ensure they're configured correctly. 4. Conflicting Dependencies: - Check Dependencies: Review your project's dependencies for any conflicts with XCTAutomationSupport. - Update/Remove Conflicting Libraries: Update or remove conflicting libraries. Additional Troubleshooting: - Restart Xcode: Sometimes a simple restart can resolve linking issues. - Delete Derived Data: Delete the Derived Data folder (located at ~/Library/Developer/Xcode/DerivedData) to clear potential build issues. - Check Linker Flags: Review linker flags in your project's build settings for any potential conflicts. ..
Hi Raghav, I couldnt find WedDriverAgent folder in this location -> /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WedDriverAgent. Am I missing something here. pl advice.
Hi Ragav, my xcode build succussed , device could turn on, I wrote code like your, but I still get /wd/hub/session 500 error when I run my code, also I can see something like "No WDAs on the device." please help me!
Hi, The error (/wd/hub/session 500 error) indicates that there is an issue with the WebDriver session Can be due to: 1. Incorrect configuration of the Appium server or WebDriverAgent: Make sure that your Appium server is configured correctly, and that the Appium WebDriverAgent is installed and running on the device 2. iOS version incompatibility: Appium's WebDriverAgent is updated to support the latest version of iOS. make sure you are using the version of the WebDriverAgent that is compatible with the version of iOS running on your device 3. Incorrect WebDriverAgent setup: if the WebDriverAgent is not correctly configured, or its dependencies are missing, it will not be able to communicate with the device and you will receive this error. You may want to check the WebDriverAgent logs and see if there is any information there that can help you troubleshoot the issue 4. Insufficient permission: The WebDriverAgent may not have the necessary permissions to run on the device. You can check the system logs on the device to see if there are any error messages related to permissions You may want to try reinstalling the WebDriverAgent on the device and reconfiguring the Appium server to see if that resolves the issue If the issue persists, you can try adding the -d option when starting the appium server. This will print the debug logs to the console, and you may find useful information to troubleshoot the issue
Hi Raghav - Build and Run WebDriverAgent Project is an optional step ? If I have ipa file which is provided my Developer. Can I skip this step which explained in xcode. I understood steps but dnt understand why we are doing this ? and what role it plays when i run my scripts from Eclipse. Can you please provide info.
Such a pity people don't do good documentation like this more of the time. You don't mention appium-doctor? I believe it helps with carthage and webdriveragent source installation issues.
Hi Ragav I am trying to set up automation for iOS mobile native app and following your tutorial but I am confuse when to use appium vs appium studio and also having issue setting up webdriveragent. Any suggestions? By the way your videos are very helpful Thank you for that.
Thanks Raghav this video is very helpful. But i am facing issue with real iOS device testing. Not able to import the distribution certificate. Do you have Any idea or any link?
Harsh Let's break it down step by step. Step 1: Install Appium Make sure you have Appium installed on your system. You can download and install Appium from the official website: Step 2: Install Selenium You mentioned you're using Selenium, so I assume you already have it installed. If not, you can install Selenium using pip: ``` pip install selenium ``` Step 3: Set up Appium Server Start the Appium server by running the following command in your terminal/command prompt: ``` appium ``` This will start the Appium server, and you should see a message indicating that the server is listening on a specific port (e.g., `0.0.0.0:4723/wd/hub`). Step 4: Prepare your iOS App Make sure you have an `.ipa` file for your iOS app. If you don't have one, you can create it using Xcode or other tools. Step 5: Set up Desired Capabilities Create a dictionary to store the desired capabilities for your iOS app. Here's an example: ```python desired_caps = { 'platformName': 'iOS', 'platformVersion': '14.2', # Replace with your device's iOS version 'deviceName': 'iPhone 12', # Replace with your device's name 'automationName': 'XCUITest', 'app': '/path/to/your/app.ipa', # Replace with the path to your.ipa file 'noReset': True, 'fullReset': False } ``` Step 6: Create an Appium Driver Instance Create an instance of the Appium driver using the desired capabilities: ```python from selenium import webdriver driver = webdriver.Remote(command_executor='localhost:4723/wd/hub', desired_capabilities=desired_caps) ``` Step 7: Verify the Connection Try to connect to the Appium server using the driver instance: ```python driver.get('www.google.com') ``` If everything is set up correctly, you should see the Appium server launch the iOS simulator and open the Google website --
Unfortunately, it is not possible to automate iOS apps using Appium on a Windows machine without a Mac. Appium relies on Apple's XCUITest framework, which is only available on macOS. XCUITest is the automation framework used for testing iOS apps. To automate iOS apps using Appium, you need a macOS machine or a Mac cloud service where you can set up Appium and run your tests. This is because Appium requires access to the iOS simulator or physical devices, which are only available on macOS. However, once you have a macOS machine or access to a Mac cloud service, you can use Appium with the appropriate configurations and capabilities to automate iOS app testing efficiently. In summary, to automate iOS apps using Appium, you need a macOS machine or access to a Mac cloud service. Windows machines alone cannot run Appium for iOS app automation.
Thanks Raghav , I am very much in need of Appium cources, I am in critical stage of my project. hence I hope u help me. I will also pay for the cources and I am not learner also . Please replay ASAP. my contact no. 9886854333
Hi, Raghav. How do I see device information? { "deviceName": "??", "automationName": "??" } I tried with "adb devices" but I don't get the device name. Thanks for the video
Hi Didier, pls check if this helps: 1. Unlock mobile device 2. Open CMD 3. Run command : adb devices 4. Run command : adb shell 5. On mobile store open the app that you want to check 6. Run command : dumpsys window windows | grep -E ‘mCurrentFocus’ 7. appPackage and appActivity name will get displayed. Copy from here www.automationtestinghub.com/apppackage-and-appactivity-name/
For anyone experiencing the 'ValueError: No JSON object could be decoded' issue, I just went to xcode -> Preferences -> Location and change the command line tools to the Xcode version, then it seemed to run.
I'm getting an issue where i'm running ./Scripts/bootstrap.sh -d however it says no such file or directory exists, i have carthage installed also, is there something i am missing?
Hi, This error message suggests that the file "bootstrap.sh" is not present in the "Scripts" directory. To resolve this issue, you'll need to make sure that the file is in the correct location. Here are a few steps you can follow to troubleshoot this issue: Check the spelling of the file and directory names: Make sure that you're using the correct names for the file and directory. Verify the file location: Ensure that the file is located in the "Scripts" directory. You can do this by using the ls command in the terminal to list the contents of the directory. Download the file: If the file is missing, you can download it from a source that you trust and place it in the "Scripts" directory. Check the permissions of the file: Ensure that you have the necessary permissions to run the file. You can do this by using the chmod command in the terminal to modify the permissions of the file. If you're still encountering an error after following these steps, it might be helpful to consult the documentation or seek assistance from the Appium community.
Thank you for that tutorial. What I search for is testing both devices Iphone (iOS) and Samsung (Android) with appium and VisualStudioCode on a Windows 10 Operationg System. Could you help me.
Hi raghav When i open the webdriver agent project in xcode , and setting automating signin for Webdriver agent runner I am getting an issue ```There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it.``` And one more Xcode couldn't find any iOS App Development provisioning profiles matching 'com.vidushi.WebDriverAgentRunner'.
Hi, check if this helps stackoverflow.com/questions/45204842/xcode-8-asks-for-a-device-to-be-registered-to-create-provisioning-profile github.com/Provenance-Emu/Provenance/issues/596
Hi, File .IPA support real devices IOS ? When i run script on real devices , app was open but it still and not work next step ? Where did I get it wrong? Thanks
Hi Nikhil, you can place at any location. Creating a folder within the project will be helpful, so that you can provide relative path and do not have to change it even when you run from a diff system
Thank you for explaining so nicely. I am not able to execute it till the final step. I performed all the steps available in the video, I used iOS in place of Android. I got exception while running the test. Below is the log, please check and suggest, thank you. [RemoteTestNG] detected TestNG version 7.0.0 org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Command 'idevice_id -l' errored out: Error: spawn idevice_id ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:262:19) at onErrorNT (internal/child_process.js:464:16) at processTicksAndRejections (internal/process/task_queues.js:80:21) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'Arpits-MBP.hsd1.ca.comcast.net', ip: '2601:646:8084:5160:0:0:0:24c4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.1', java.version: '1.8.0_232' Driver info: driver.version: IOSDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Command 'idevice_id -l' errored out: Error: spawn idevice_id ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:262:19) at onErrorNT (internal/child_process.js:464:16) at processTicksAndRejections (internal/process/task_queues.js:80:21) at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9) at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'Arpits-MBP.hsd1.ca.comcast.net', ip: '2601:646:8084:5160:0:0:0:24c4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.1', java.version: '1.8.0_232' Driver info: driver.version: IOSDriver at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208) at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217) at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239) at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552) at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41) at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1) at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1) at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213) at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:336) at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131) at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:37) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:88) at io.appium.java_client.AppiumDriver.(AppiumDriver.java:98) at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:90) at tests.BaseClass.setup(BaseClass.java:33) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133) at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62) at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:340) at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:294) at org.testng.TestRunner.invokeTestConfigurations(TestRunner.java:623) at org.testng.TestRunner.beforeRun(TestRunner.java:613) at org.testng.TestRunner.run(TestRunner.java:584) at org.testng.SuiteRunner.runTest(SuiteRunner.java:402) at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396) at org.testng.SuiteRunner.privateRun(SuiteRunner.java:355) at org.testng.SuiteRunner.run(SuiteRunner.java:304) at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53) at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96) at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180) at org.testng.TestNG.runSuitesLocally(TestNG.java:1102) at org.testng.TestNG.runSuites(TestNG.java:1032) at org.testng.TestNG.run(TestNG.java:1000) at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115) at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251) at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186) ... 38 more Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Command 'idevice_id -l' errored out: Error: spawn idevice_id ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:262:19) at onErrorNT (internal/child_process.js:464:16) at processTicksAndRejections (internal/process/task_queues.js:80:21) Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03' System info: host: 'Arpits-MBP.hsd1.ca.comcast.net', ip: '2601:646:8084:5160:0:0:0:24c4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.1', java.version: '1.8.0_232' Driver info: driver.version: IOSDriver remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Command 'idevice_id -l' errored out: Error: spawn idevice_id ENOENT at Process.ChildProcess._handle.onexit (internal/child_process.js:262:19) at onErrorNT (internal/child_process.js:464:16) at processTicksAndRejections (internal/process/task_queues.js:80:21) at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9) at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62) at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30) at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958) at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126) at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499) at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486) at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152) at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531) at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128) ... 43 more In side Test Now - Arpit's iPhone 8 13.1.2 PASSED: test =============================================== Default test Tests run: 1, Failures: 0, Skips: 0 =============================================== =============================================== Default suite Total tests run: 1, Passes: 1, Failures: 0, Skips: 0 ===============================================
Hi Arpit, do you have libimobiledevice installed. Try brew install libimobiledevice I have seen some solutions options here. Pls check github.com/appium/appium/issues/8031 github.com/appium/appium/issues/7096 One of the users stated - "Remove the udid capability resolves the issue"
Hello raghav , thanks for the videos . If ur from Bangalore I would like to take courses from you, if ur providing or even online class also . Plz replay for this
Hello Friend! Your lectures are great! I have a question, is it possible to perform automatic tests using Appium, for the iOS native application after watching all your lectures, without prior knowledge of programming languages and testing tools? I saw that it is possible for Appium to "remember" the steps that the tester goes through himself?
I'm getting the below error An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS\,tvOS' exited with code 1
Hello, I am able to solve all issue and script is working fine when I use my free apple id account. but, after signing with the developer account I am unable to install WebDriverAgent on the real device. On running xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=' test my terminal is stuck at a point where it says "WebDriverAgentRunner-Runner[669:141632] Using singleton test manager " and later (~30-40 minutes)i get an error Testing failed: WebDriverAgentRunner: testRunner encountered an error (Encountered a problem with the test runner after launch. (Underlying error: Lost connection to DTServiceHub))
Hi Rajat, I could not find any proper solution for this. I saw your stackoverflow question and have upvoted it. Hopefully we may get some response there stackoverflow.com/questions/59510846/unable-to-install-webdriveragent-on-real-device-using-developer-account#
I am getting below error when executing "npm install appium" . Please suggest npm ERR! code ENOENT npm ERR! syscall chmod npm ERR! path /usr/local/lib/node_modules/appium/build/lib/main.js npm ERR! errno -2 npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/appium/build/lib/main.js' npm ERR! enoent This is related to npm not being able to find a file.
this can be due to corruption on appium packages. You can try to 1. Delete node_modules folder manually. 2. Install Node ( nodejs.org/en/download ) 3. Install appium (check with a diff ver)
Hi Raghav. Need help please. Getting error as ------------------- Building scheme "iOS Framework" in CocoaAsyncSocket.xcodeproj. Build Failed. Task failed with exit code 1 ........ after running ./Scripts/bootstrap.sh -d command on Terminal XCode Command Line Tools & Carthage is already installed. Mac OS: Catalina XCode: 12 Appium: 1.12.1
Dear Raghav, I am trying to automate iOS application using appium. I have done setting up in Xcode ( Performed clean, build and ran ) for the integration app to my real device and I observed the Integration app is installed into my real iphone 11 ( iOS version : 13.4) and then I checked for WebAgentRunner but it is not installed using xcode and later when I tried to connect to same real device using appium and trying to deploy my real app , I can install using appium but there are some issues which is provided in details log here : uitting and uninstalling WebDriverAgent [XCUITest] Shutting down sub-processes [XCUITest] No WDAs on the device. [XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: Trying to use WebDriverAgent project at '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj' but the file does not exist. Make sure you follow the tutorial at github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device. [XCUITest] at quitAndUninstall (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:527:15) [XCUITest] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:557:11 [XCUITest] at wrapped (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:35:13) [XCUITest] at retry (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:18:13) [XCUITest] at retryInterval (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:45:10) [XCUITest] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:537:7 [DevCon Factory] Releasing connections for 00008030-000E0D542E22802E device on any port number [DevCon Factory] Found cached connections to release: ["00008030-000E0D542E22802E:8100"] [DevCon Factory] Releasing the listener for '00008030-000E0D542E22802E:8100' [DevCon Factory] Cached connections count: 0 [XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on. [BaseDriver] Event 'newSessionStarted' logged at 1608014823112 (12:17:03 GMT+0530 (India Standard Time)) [MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: Trying to use WebDriverAgent project at '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj' but the file does not exist. Make sure you follow the tutorial at github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device. [MJSONWP] at quitAndUninstall (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:527:15) [MJSONWP] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:557:11 [MJSONWP] at wrapped (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:35:13) [MJSONWP] at retry (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:18:13) [MJSONWP] at retryInterval (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:45:10) [MJSONWP] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:537:7 [HTTP] DELETE /wd/hub/session [HTTP] {} [HTTP] No route found. Setting content type to 'text/plain' [HTTP]
Hi. I have done the real device setup for iOS devices automation. While clicking on build it is able to install webdriveragent in iphone 6s and iphone x but though the build gets succeed for iPad but it doesn't install webdriveragent
It would be great if u can help in this regard. Another problem is some phones got updated to 12.2 or more ios versions and that is now not working with xcode 10.13.6.
Hi Raghav, I followed every step and my build failed on Terminal, 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.
Hi Sai, was the device locked during execution, Also check if USB debugging is one. You can also check online for your specific device ver, in case any extra settings are required
Why not you show step 9 for Appium for Desktop and I am getting the error as "Failed to create provisioning profile" after changing the product bundle identifier as per your instruction. I opened the WebDriverAgent.xcodeprej from appium desktop folder. Can you tell me the solution?
Hi Pankaj, Go to WebDriverAgentRunner -> Build Settings -> Build Settings -> Packaging -> Product Bundle Identifier and change it. After changing clear the project and rebuild it. stackoverflow.com/questions/40484957/appium-error-xcode-couldnt-find-a-provisioning-profile-matching-com-facebook-w github.com/appium/appium/issues/8144
It really helps me, thanks@Raghav for your great video. But I have a problem when connecting to real device, it can not be install .app file, but works fine with .ipa file. Do you have any idea on this?
while running this command ./Scripts/bootstrap.sh -d its displays as -bash: ./scripts/bootstrap.sh: No such file or directory. Please help me to resolve this.
Hello Raghav Can we automate iOS ipa with Appium in the Windows operating system using Simulator Or any other way to run ipa using window without having MAC devices...?
Hi Raghav, I was able to solve the webdriveragent app not getting installed in simulator as build was getting failed. Now I have added a .app file in capabilities and clicked on start session which inturn started to uninstall and install the WebDriverAgent app continously. Can you please help on this?
Manikant The issue you are facing is that the Appium driver is trying to uninstall and reinstall the WebDriverAgent app continuously. This is likely because the Appium driver is not able to find the WebDriverAgent app in the simulator. To fix this issue, you need to make sure that the WebDriverAgent app is installed in the simulator. You can do this by following these steps: 1. Open the Xcode project for the WebDriverAgent app. 2. In the project navigator, select the target for the WebDriverAgent app. 3. In the General tab, make sure that the "Deployment Target" is set to the version of iOS that you are using for the simulator. 4. Click on the "Build" button to build the WebDriverAgent app. 5. In the simulator, click on the "Debug" menu and select "Simulate Device." 6. In the simulator, click on the "File" menu and select "Install App." 7. Browse to the location of the WebDriverAgent app and select it. Once the WebDriverAgent app is installed in the simulator, the Appium driver should be able to find it and start a session. If you are still having trouble getting the Appium driver to work, you can try the following: * Make sure that you are using the latest version of the Appium driver. * Make sure that you are using the correct version of the WebDriverAgent app for the version of iOS that you are using. * Check the logs for any errors. * Contact the Appium support team for help. Here are some additional things you can try: * Make sure that the WebDriverAgent app is signed with the correct provisioning profile. * Make sure that the WebDriverAgent app is installed in the correct location. * Try restarting the simulator. * Try using a different simulator. * Contact Apple support for help. I hope this helps
Hi Ragahav.When I try to open the WebdriverAgent.xcode project its showing error- Two xcode in my system-Xcode 10.1(defalut) and Xcode9.4.1 .Tried with two but not opening. With 9.4.1 its showing the below error - The project at '/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj' cannot be opened because it is in a future Xcode project file format. Adjust the project format using a compatible version of Xcode to allow it to be opened by this version of Xcode. With 10.1-Nothing is happening . I moved this from application to trash. I need to open in xcode9.4.1. Can you please help on this ?
Hi Raghav, Thanks for creating very easy and helpful tutorial. I followed the video and I am able to setup with IOS real Device but now my iPad version updated so from 14.4 to 14.6 because of update I am getting unsupported OS version. Could you please help me out what could be the root to fix the issue . Thanks in advance.
I found XcuiDriver agent using this command "/opt/homebrew/lib/node_modules/appium/node_modules/appium-webdriveragent" may be path is little changed during time
Hi , How to resolve this error . "Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'Scripts/bootstrap.sh -d' exited with code 1" ? Thanks
Hi Tessin, I was checking on this and got these 2 responses: 1. I had the same problem. Please try importing the web driver agent dependencies. In terminal cd into the "Appium.app/contents/resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/webdriveragent" directory and run: ./Scripts/bootstrap.sh I have tried this and I am getting another error but suspect it is related to my local environment so the bootstrap.sh script may be all you need. 2. Solved. After degrade Appium to v1.7.1, everything is worked as usual
Your entire videos or sessions are purely based on installation and download but not for how to use appium with certain application and how to automate them like drag drop, calender, reports, each and every functionality we can automate.
Hi Amit, I understand your concern, I will be adding more videos to this, This was created as a very basic, beginners playlist for appium, Will add more sessions
without running the command " ./Scripts/bootstrap.sh -d" i am able to find "WebDriverAgent.xcodeproj" and its getting open in xcode ,is it necessary to run this command ?
Looks like the WebDriveragent folder doesnt exist in 2022 ( at least not in that path), does anybody know if its been moved or if there is an extra step now to get it? Thanks
Hello, I have an automation script set up and running with the above set up. Any idea how I can integrate the script in a pipeline, the catch being that the app I'm testing requires hardware sim card dependability. Thanks in advance
For new versions here is the path of WebDriverAgent for Appium Desktop: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent
For Appium installed through node:
/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent
Thanks for adding Amit
Hi Ragav, your this video pulled me out of iOS setup for which I was struggling from weeks. You are the Best. Thanks for your hard work behind this to make understand people who want to get into automation.
Happy and humbled to know this Hasmukh
This is the best tutorial I have found. Everything from scratch.
So happy to know Amit
Hello! Thank you for the video, it was useful for me.
But since then following has changed:
1) location: /usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent
2) no need to run ./Scripts/bootstrap.sh -d for appium > 1.20
3) 'instruments -s devices' deprecated in Xcode 13, instead use 'xcrun xctrace list devices'
Thanks for adding Cristina
I will check and plan new sessions
thank you 👍
Thank you for this video! There is a typo in the vid & notes:
For Appium Installed through node
/usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WedDriverAgent
WedDriverAgent should be WebDriverAgent
Thanks for letting me know Chris
The Best tutorial I have ever seen.
Thanks a lot Janine
Hello, I would like to ask how to initialize the WebDriverAgent in Appium 1.21 version as the directory of WebDriverAgent cannot be found in appium-xcuitest-driver. Thank you very much
Hi, I will need to check on this, Pls try some online help meanwhile
@@RaghavPal Facing the same. Any solution?
Hi Raghav, I am using macOS in virtual box (Big Sur). Inside Appium-xcuitest-driver folder, I can see index.js, package.json, README.md, LICENSE, lib, build. I could find the WebDriverAgent in the given location, please advice.
Hi, For new versions here is the path of WebDriverAgent for Appium Desktop: /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent
For Appium installed through node:
/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent
Your entire video was very very useful to me, Thank you very much for sharing this video. With the help of this video I managed to solve one blocker issue in setup. Keep it up.
So happy to know Tushar
Thanks Raghav.. i tried it with mac on virtualbox.. you have explained very clearly each process otherwise a complex process ..
You are most welcome
Thank You Raghav by referring your video i have configured AppleTV for Automation :)
You are most welcome Girish
A neat explanation for the beginners. Thanks for this series. Helped a lot.
You're welcome Vijay
Thanks a lot for creating this video. It really helped me to get onboard to appium quickly.
So happy to know this Praveen
what to o if all 8 steps was successfully done but next step not? I cant find WebDriverAgent folder when I put path For Appium Desktop. Plus when I run ./Scripts/bootstrap.sh -d it is says 'no such file or directory'. Thanks for answer!
in latest Appium webdriveragent folder can be found in xcuitest/node-moodules/{here}
Thanks for the inputs Rasul. Viktor pls check
@@RaghavPal still cant find maybe it is because it was installed only Appium for desktop? (not through node)
You can check that and also a diff ver if required.
@@RaghavPal thanks!
Thank you so much! your series has on Appium has been so helpful in my slow progression with learning test automation. 😄👍🏾
You're welcome Hayden
Hi Raghav,
I have a few doubts related to mobile automation, Could you please respond if possible,
1. I have a Windows machine and Can I automate iOS apps from Windows machines.
2. Is it possible using an emulator?
3. Can I automate OS independent code? Means If I do the automation on Windows then Can i run it on MacBook? and vice versa.
Hi Rahul,
1. If you want to use a real, local device, then No, you will need a Mac OS for iOS testing, But if you can use remote platforms and infrastructure, then can be done from Windows
2. Yes you can
3. You can, will need to add some conditional statements are few places based on os
Hello Raghav. First of all thanks for the tutorial. It is very helpful. You explain very well. However I have a question. When we execute webdriver test, (xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=***' test) it seems to be stuck with 'Using singleton test manager'. It seems many people face it but there is no solution to all the Q in the internet. Do you have Any idea ?
Hi Mona, I am not sure and will have to check practically, you can also check all the user comments in case someone has come to some solution
Hey Mona,
Did you get any solution. I am also facing same issue. Please share.
@@ankurvarshney1862 Hello, No i din find any solution but i think there is no impact in using WebDriverAgent. I still have that error but I have successfully created my test framework.
@@Dua958 Yes, I am also able to carry out testing. But sometimes facing issues wile locating elements with Appium inspector. App screenshot on Appium inspector doesn't load
Thanks for another great video on automation. I needed your input, can we use the same tools for tvOS ?
Hi Sheetal
I am not sure on this, will need to take online help
@@RaghavPal Thank you
Thanks for sharing.
I wonder about the apple id. It is paid account or not?. Because i tested with failure
Its not paid, as far as I know Thao, I never paid for that. You can check online
Raghav, don't we require to set any environment variable path in MAC ?
There should be env variables set for JAVA, ANDROID_HOME etc. Pls see this czcams.com/video/7APcLr-cBM8/video.html
Hi Raghav, Our scenario is that we want to run the test from host windows machine and connect to real Mac devices. We were trying with Mac2driver but unable to connect to device. Do you have any video for the same and also if we want to run these tests in pipeline that what kind of host is needed? Please suggest
RS
For the issue with Mac2Driver, it might be due to some configuration or compatibility issues. You can check the official documentation or community forums for potential solutions
To run these tests in a pipeline, you would need a Continuous Integration/Continuous Deployment (CI/CD) environment. Jenkins is a popular open-source tool that can be used for this purpose
You can also use GitHub Actions for running your tests..
The host machine should have the following basic requirements for the Appium server[^10^]:
- A macOS, Linux, or Windows operating system
- Node.js version in the SemVer range ^14.17.0 || ^16.13.0 || >=18.0.0
- npm version >=8
..
Hi raghav. Great explained.
Want to know that what if we use appium driver instead of ios driver ?
What is best approach ?
Hi Pravin, this can help stackoverflow.com/questions/35286135/difference-between-appiumdrivermobileelement-and-androiddriver
Thanks for this vey useful video Raghav Pal. Keep up the good work..!!
You're welcome Nipun
Hello Raghav,
I am following your vedios and those are very easy to understand. Thank u for sharing your knowledge.
Raghav I want to connect a real ios device on my Mac for appium framework. So which vedio should I refer. Can you please guide me
Thanks in advance
Hi Aniket, as of now I do not have a video on real iOS device connection with Mac, will plan to do it
@@RaghavPalokay... Thank you once again for sharing your knowledge.
Really helpful.
How to get app package and app activity of native app - ios device ?
Hi Syed, see if this helps
1. Unlock mobile device
2. Open CMD
3. Run command : adb devices
4. Run command : adb shell
5. On mobile store open the app that you want to check
6. Run command : dumpsys window windows | grep -E ‘mCurrentFocus’
7. appPackage and appActivity name will get displayed. Copy from here
www.automationtestinghub.com/apppackage-and-appactivity-name/
Thanks for this amazing video sir. But do we required Mac OS to create mobile automation script for IOS? adn do we required two different setups for android and ios?
we need Xcode and therefore will require Mac for iOS
You can try TestProject
Hey Raghav, is it like we need to register our device udid somewhere linked to our apple id?
Is paid apple profile is required for profiling purpose or we can use free apple profiles too?
Hi Jaya, you should be able to use the free apple id. On device, you just need to trust connection and have uiautomation enabled. pls check appium.io/docs/en/drivers/ios-xcuitest-real-devices/
@@RaghavPal it says to go to "Settings => General => Device Management " on the device, but there is no 'Device Management' under Settings-General. Please advise.
@@RaghavPal I got it working by following steps here: stackoverflow.com/questions/39603667/failed-to-create-provisioning-profile Specifically, after connecting my phone, selecting it from XCode menu Project -> Destination -> (selected my device)
Thanks Raghav, this is very detailed. I wonder, have you found any easy way to do this set up, seems like a lot of steps just to have Appium linked with the device. Thanks again!
Hi Jorge, yes, with mac setup there is a bit longer process, As of now I believe this is the way, In case I get any updates will update in video description
Hi Raghav, I was trying to set up xcode the way you have shown in the video, but it shows build failed whenever I am trying to perform buid. I have searched on google but couldn't find any solution which can resolve this issue. Can you please help in that.
Hi Anchal,
It sounds like you are encountering an issue with building your Xcode project when using Appium on a MacOS machine. There could be a few reasons why this is happening:
Try cleaning your build folder and delete derived data
Try to re-install Appium, if the issue still persist
You can also try to check your system logs, sometimes there may be some issue with permissions
If you still facing the same issue, you can try to update your xcode to the latest version, it might help.
How amazingly you have explained everything! Thank you :)
You're welcome Megha
Thank you for this explanation!
Most welcome Kashif
Hi Raghav, Thank you so much for this training series. Can you also tell me how to connect IOS mobile from Windows laptop ?
From windows, you will need some mac agent
@@RaghavPal Thank you, any specific agent you have used in your projects?
For iOS I used my mac system itself. Basically you need xcode with is present on mac and not on windows
Hi Admin, I don't see WebDriverAgent as you shown. I am using Appium Desktop (1.18.3)
Will need to check the setup again
Hi Raghav can u plz guide us how to upload any file with the help of appium.it would be really helpful.i tried lot but not able to perform any file upload scenario
I will check on that Debayan
@@RaghavPal thank you
Hi Raghav , thank you for this video. I am not able to sign-in with a profile, but my Xcode build is successful and launches IntegrationApp to simulator. Also, when I run my test automation, I am getting the following error- Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'Scripts/bootstrap.sh -d' exited with code 1
Hi, pls see the options here - github.com/facebookarchive/WebDriverAgent/issues/840
I'm unable to access the WebDriverAgent on my mac, both installed Appium using npm and the Desktop version however was still unable to locate the WebDriverAgent Directory
Hi Enyinnaya,
The WebDriverAgent is a component of Appium that provides a server for running WebDriver tests on iOS devices. If you're unable to locate the WebDriverAgent directory, there are a few steps you can take to resolve this issue:
Check if the WebDriverAgent was installed correctly: The WebDriverAgent is typically installed as part of the Appium setup process. If the installation was unsuccessful, you may need to reinstall Appium or the WebDriverAgent.
Check your Appium version: The location of the WebDriverAgent directory may be different depending on the version of Appium you're using. Make sure you're using the latest version of Appium and check the documentation for information on the location of the WebDriverAgent directory.
Check the Appium logs: If the WebDriverAgent is not starting or is not working as expected, you can check the Appium logs for information on the issue. The logs may contain information that can help you diagnose and resolve the problem.
Check the Xcode version: The WebDriverAgent is built using Xcode, so you will need to have a compatible version of Xcode installed on your Mac. Make sure you have the latest version of Xcode installed and check the Appium documentation for information on the minimum required version.
Rebuild the WebDriverAgent: If the WebDriverAgent is not working as expected, you can try rebuilding it using the following command:
./Scripts/bootstrap.sh
This command will rebuild the WebDriverAgent and may resolve any issues you're encountering.
Note: These steps should help you resolve most issues related to the WebDriverAgent. If you continue to experience problems, you may want to check the Appium forums or ask for help on Stack Overflow for additional assistance.
I followed your mention steps but I am facing below issue -
Error getting screenshot: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to the remote server. Original error: socket hang up.
Can you please help me to resolve this issue. please
Hi Kuldeep, try restarting both my Android emulator or connecting device again and also Appium server.
Helpful videos.. Can we do the same iOS Set up on windows 10?
I will plan a session, It will anyways need an iOS agent
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
Hi Veethica,
Pls check this can help
stackoverflow.com/questions/53643318/xctests-canceling-prematurely
github.com/appium/appium/issues/13487
@@RaghavPal i did restart my device but still not able to install it
I will need to check. Pls keep trying for online help
Good Explanation. Thank you 👍👍
Most welcome
hii I have below error once press on build ( what done here in 24:05 ) ld: cannot link directly with 'XCTAutomationSupport' because product being built is not an allowed client of it
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Islam
Can try these:
1. Xcode Version 14 or Later:
- Update Appium Server: Ensure you're using the latest Appium version (2.0 or later) which has a fix for this issue.
- Install Latest XCUITest Driver: Run `appium driver install xcuitest` or `appium driver update xcuitest`.
- Use Prebuilt WDA: If updating Appium isn't feasible, download the prebuilt WebDriverAgent (WDA) and use the `usePrebuiltWDA` capability in your test scripts.
2. Missing or Incorrect Framework Linking:
- Check Linked Frameworks: In Xcode, verify that "XCTAutomationSupport.framework" is listed under "Linked Frameworks and Libraries" in the "General" tab of your project settings.
- Manually Add Framework: If it's missing, add it manually.
- Embed Framework: If it's already listed, change its "Embed" setting to "Embed & Sign".
3. Xcode Signing Issues:
- Clean and Rebuild: Clean your project (Product > Clean Build Folder) and then rebuild.
- Verify Signing: If you're using custom signing profiles, ensure they're configured correctly.
4. Conflicting Dependencies:
- Check Dependencies: Review your project's dependencies for any conflicts with XCTAutomationSupport.
- Update/Remove Conflicting Libraries: Update or remove conflicting libraries.
Additional Troubleshooting:
- Restart Xcode: Sometimes a simple restart can resolve linking issues.
- Delete Derived Data: Delete the Derived Data folder (located at ~/Library/Developer/Xcode/DerivedData) to clear potential build issues.
- Check Linker Flags: Review linker flags in your project's build settings for any potential conflicts.
..
Hi Raghav, I couldnt find WedDriverAgent folder in this location -> /usr/local/lib/node_modules/appium/node_modules/appium-xcuitest-driver/WedDriverAgent. Am I missing something here. pl advice.
Hi VJ, not sure if something has changed in xcode. Will need to check latest docs
@@RaghavPal Pl check and let me know
Hi Ragav, my xcode build succussed , device could turn on, I wrote code like your, but I still get /wd/hub/session 500 error when I run my code, also I can see something like "No WDAs on the device." please help me!
Hi, The error (/wd/hub/session 500 error) indicates that there is an issue with the WebDriver session
Can be due to:
1.
Incorrect configuration of the Appium server or WebDriverAgent: Make sure that your Appium server is configured correctly, and that the Appium WebDriverAgent is installed and running on the device
2.
iOS version incompatibility: Appium's WebDriverAgent is updated to support the latest version of iOS. make sure you are using the version of the WebDriverAgent that is compatible with the version of iOS running on your device
3.
Incorrect WebDriverAgent setup: if the WebDriverAgent is not correctly configured, or its dependencies are missing, it will not be able to communicate with the device and you will receive this error. You may want to check the WebDriverAgent logs and see if there is any information there that can help you troubleshoot the issue
4.
Insufficient permission: The WebDriverAgent may not have the necessary permissions to run on the device. You can check the system logs on the device to see if there are any error messages related to permissions
You may want to try reinstalling the WebDriverAgent on the device and reconfiguring the Appium server to see if that resolves the issue
If the issue persists, you can try adding the -d option when starting the appium server. This will print the debug logs to the console, and you may find useful information to troubleshoot the issue
Hi Raghav - Build and Run WebDriverAgent Project is an optional step ? If I have ipa file which is provided my Developer. Can I skip this step which explained in xcode.
I understood steps but dnt understand why we are doing this ? and what role it plays when i run my scripts from Eclipse.
Can you please provide info.
Yes you can try Vaibhav
Such a pity people don't do good documentation like this more of the time. You don't mention appium-doctor? I believe it helps with carthage and webdriveragent source installation issues.
Sure Conrad
Hello Sir,
Getting error 'no such file or directory' while running the script './Scripts/bootstrap.sh'. Can you suggest any solution for this?
Hi Priyanka, Try to reinstall carthage with brew
brew uninstall carthage
brew install carthage
Hi Ragav I am trying to set up automation for iOS mobile native app and following your tutorial but I am confuse when to use appium vs appium studio and also having issue setting up webdriveragent. Any suggestions? By the way your videos are very helpful Thank you for that.
Hi Xama, Appium Studio helps to do some basic setup, that you will have to do in case of Appium. I have a session on Appium Studio, can watch that
Thanks Raghav this video is very helpful. But i am facing issue with real iOS device testing. Not able to import the distribution certificate. Do you have Any idea or any link?
Hi Irfana, pls check some earlier related comments, You may have to get some online help too
is it possible to use iOS device (Actual) on windows machine?
So far I only got is the UDID of the iOS phone
Hi Omar, To test iOS device, I believe you will either need a mac os or a mac agent connected to windows system
Hi Raghav, are the steps same for working with chrome browser on iOS device?
should work on that too Aditya, pls try and check
Hi raghav please help me out for set up for appium for iOS app from selenium with desired capabilities I am getting too much error
Harsh
Let's break it down step by step.
Step 1: Install Appium
Make sure you have Appium installed on your system. You can download and install Appium from the official website:
Step 2: Install Selenium
You mentioned you're using Selenium, so I assume you already have it installed. If not, you can install Selenium using pip:
```
pip install selenium
```
Step 3: Set up Appium Server
Start the Appium server by running the following command in your terminal/command prompt:
```
appium
```
This will start the Appium server, and you should see a message indicating that the server is listening on a specific port (e.g., `0.0.0.0:4723/wd/hub`).
Step 4: Prepare your iOS App
Make sure you have an `.ipa` file for your iOS app. If you don't have one, you can create it using Xcode or other tools.
Step 5: Set up Desired Capabilities
Create a dictionary to store the desired capabilities for your iOS app. Here's an example:
```python
desired_caps = {
'platformName': 'iOS',
'platformVersion': '14.2', # Replace with your device's iOS version
'deviceName': 'iPhone 12', # Replace with your device's name
'automationName': 'XCUITest',
'app': '/path/to/your/app.ipa', # Replace with the path to your.ipa file
'noReset': True,
'fullReset': False
}
```
Step 6: Create an Appium Driver Instance
Create an instance of the Appium driver using the desired capabilities:
```python
from selenium import webdriver
driver = webdriver.Remote(command_executor='localhost:4723/wd/hub',
desired_capabilities=desired_caps)
```
Step 7: Verify the Connection
Try to connect to the Appium server using the driver instance:
```python
driver.get('www.google.com')
```
If everything is set up correctly, you should see the Appium server launch the iOS simulator and open the Google website
--
Hi Ragav, can you please let me know if there is any way to automate iOS apps using Appium on windows machine, and not in Mac ?
Unfortunately, it is not possible to automate iOS apps using Appium on a Windows machine without a Mac. Appium relies on Apple's XCUITest framework, which is only available on macOS. XCUITest is the automation framework used for testing iOS apps.
To automate iOS apps using Appium, you need a macOS machine or a Mac cloud service where you can set up Appium and run your tests. This is because Appium requires access to the iOS simulator or physical devices, which are only available on macOS.
However, once you have a macOS machine or access to a Mac cloud service, you can use Appium with the appropriate configurations and capabilities to automate iOS app testing efficiently.
In summary, to automate iOS apps using Appium, you need a macOS machine or access to a Mac cloud service. Windows machines alone cannot run Appium for iOS app automation.
I am in need of appium training . Hence I hope u would help me.
I will notify in case I take any batches for appium, you can subscribe to get notified
Thanks Raghav , I am very much in need of Appium cources, I am in critical stage of my project. hence I hope u help me. I will also pay for the cources and I am not learner also . Please replay ASAP. my contact no. 9886854333
Hi Abhinandan, As of now other pre-planned engagements are going on. Request you to get online help for now
Hi, Raghav.
How do I see device information?
{
"deviceName": "??",
"automationName": "??"
}
I tried with "adb devices" but I don't get the device name.
Thanks for the video
Hi Didier, pls check if this helps:
1. Unlock mobile device
2. Open CMD
3. Run command : adb devices
4. Run command : adb shell
5. On mobile store open the app that you want to check
6. Run command : dumpsys window windows | grep -E ‘mCurrentFocus’
7. appPackage and appActivity name will get displayed. Copy from here
www.automationtestinghub.com/apppackage-and-appactivity-name/
For anyone experiencing the 'ValueError: No JSON object could be decoded' issue, I just went to xcode -> Preferences -> Location and change the command line tools to the Xcode version, then it seemed to run.
Thanks for sharing
instablaster.
I'm getting an issue where i'm running ./Scripts/bootstrap.sh -d however it says no such file or directory exists, i have carthage installed also, is there something i am missing?
Hi,
This error message suggests that the file "bootstrap.sh" is not present in the "Scripts" directory. To resolve this issue, you'll need to make sure that the file is in the correct location.
Here are a few steps you can follow to troubleshoot this issue:
Check the spelling of the file and directory names: Make sure that you're using the correct names for the file and directory.
Verify the file location: Ensure that the file is located in the "Scripts" directory. You can do this by using the ls command in the terminal to list the contents of the directory.
Download the file: If the file is missing, you can download it from a source that you trust and place it in the "Scripts" directory.
Check the permissions of the file: Ensure that you have the necessary permissions to run the file. You can do this by using the chmod command in the terminal to modify the permissions of the file.
If you're still encountering an error after following these steps, it might be helpful to consult the documentation or seek assistance from the Appium community.
Thank you for that tutorial.
What I search for is testing both devices Iphone (iOS) and Samsung (Android) with
appium and VisualStudioCode on a
Windows 10 Operationg System.
Could you help me.
Hi Heiko, on VS Code I am yet to work with appium. I will take our time for this, but for now pls take online help
Very clear instructions... thanks bro
You're welcome
Installed appium through node , cant find WebDriverAgent folder in the xcuite folder location
Hi Sourav, run this command
npm ls -g appium-webdriver
check this github.com/appium/appium/issues/13297
Hi raghav
When i open the webdriver agent project in xcode , and setting automating signin for Webdriver agent runner I am getting an issue
```There are no devices registered in your account on the developer website. Plug in and select a device to have Xcode register it.```
And one more
Xcode couldn't find any iOS App Development provisioning profiles matching 'com.vidushi.WebDriverAgentRunner'.
Hi, check if this helps stackoverflow.com/questions/45204842/xcode-8-asks-for-a-device-to-be-registered-to-create-provisioning-profile
github.com/Provenance-Emu/Provenance/issues/596
Hi,
File .IPA support real devices IOS ?
When i run script on real devices , app was open but it still and not work next step ? Where did I get it wrong?
Thanks
Any logs
I solved the problem in WDA,
Thanks@@RaghavPal
Thanks for such a detailed video. Where do we place the IOS app file? Im very new to this
Hi Nikhil, you can place at any location. Creating a folder within the project will be helpful, so that you can provide relative path and do not have to change it even when you run from a diff system
@@RaghavPal my simulator opens but the it doesn't switch on at all.
Hi Nikhil, I will not be able to troubleshoot without checking the setup and code. You can try online help
Thank you for explaining so nicely. I am not able to execute it till the final step.
I performed all the steps available in the video, I used iOS in place of Android.
I got exception while running the test.
Below is the log, please check and suggest, thank you.
[RemoteTestNG] detected TestNG version 7.0.0
org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Command 'idevice_id -l' errored out: Error: spawn idevice_id ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:262:19)
at onErrorNT (internal/child_process.js:464:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Arpits-MBP.hsd1.ca.comcast.net', ip: '2601:646:8084:5160:0:0:0:24c4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.1', java.version: '1.8.0_232'
Driver info: driver.version: IOSDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Command 'idevice_id -l' errored out: Error: spawn idevice_id ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:262:19)
at onErrorNT (internal/child_process.js:464:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9)
at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Arpits-MBP.hsd1.ca.comcast.net', ip: '2601:646:8084:5160:0:0:0:24c4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.1', java.version: '1.8.0_232'
Driver info: driver.version: IOSDriver
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)
at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:336)
at org.openqa.selenium.remote.RemoteWebDriver.(RemoteWebDriver.java:131)
at io.appium.java_client.DefaultGenericMobileDriver.(DefaultGenericMobileDriver.java:37)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:88)
at io.appium.java_client.AppiumDriver.(AppiumDriver.java:98)
at io.appium.java_client.ios.IOSDriver.(IOSDriver.java:90)
at tests.BaseClass.setup(BaseClass.java:33)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:133)
at org.testng.internal.MethodInvocationHelper.invokeMethodConsideringTimeout(MethodInvocationHelper.java:62)
at org.testng.internal.ConfigInvoker.invokeConfigurationMethod(ConfigInvoker.java:340)
at org.testng.internal.ConfigInvoker.invokeConfigurations(ConfigInvoker.java:294)
at org.testng.TestRunner.invokeTestConfigurations(TestRunner.java:623)
at org.testng.TestRunner.beforeRun(TestRunner.java:613)
at org.testng.TestRunner.run(TestRunner.java:584)
at org.testng.SuiteRunner.runTest(SuiteRunner.java:402)
at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:396)
at org.testng.SuiteRunner.privateRun(SuiteRunner.java:355)
at org.testng.SuiteRunner.run(SuiteRunner.java:304)
at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:53)
at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:96)
at org.testng.TestNG.runSuitesSequentially(TestNG.java:1180)
at org.testng.TestNG.runSuitesLocally(TestNG.java:1102)
at org.testng.TestNG.runSuites(TestNG.java:1032)
at org.testng.TestNG.run(TestNG.java:1000)
at org.testng.remote.AbstractRemoteTestNG.run(AbstractRemoteTestNG.java:115)
at org.testng.remote.RemoteTestNG.initAndRun(RemoteTestNG.java:251)
at org.testng.remote.RemoteTestNG.main(RemoteTestNG.java:77)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
... 38 more
Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Command 'idevice_id -l' errored out: Error: spawn idevice_id ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:262:19)
at onErrorNT (internal/child_process.js:464:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
System info: host: 'Arpits-MBP.hsd1.ca.comcast.net', ip: '2601:646:8084:5160:0:0:0:24c4%en0', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.15.1', java.version: '1.8.0_232'
Driver info: driver.version: IOSDriver
remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Command 'idevice_id -l' errored out: Error: spawn idevice_id ENOENT
at Process.ChildProcess._handle.onexit (internal/child_process.js:262:19)
at onErrorNT (internal/child_process.js:464:16)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
at getResponseForW3CError (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:826:9)
at asyncHandler (/usr/local/lib/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:447:37)
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193)
at java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
at java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:126)
at java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:499)
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:486)
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472)
at java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:152)
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:531)
at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
... 43 more
In side Test Now - Arpit's iPhone 8 13.1.2
PASSED: test
===============================================
Default test
Tests run: 1, Failures: 0, Skips: 0
===============================================
===============================================
Default suite
Total tests run: 1, Passes: 1, Failures: 0, Skips: 0
===============================================
Hi Arpit, do you have libimobiledevice installed. Try
brew install libimobiledevice
I have seen some solutions options here. Pls check
github.com/appium/appium/issues/8031
github.com/appium/appium/issues/7096
One of the users stated - "Remove the udid capability resolves the issue"
Hello raghav , thanks for the videos . If ur from Bangalore I would like to take courses from you, if ur providing or even online class also . Plz replay for this
Hi Abhinandan, not in Bangalore, you can find all work here - automationstepbystep.com/online-courses/
Hello Ragav, ios deploy -c doesn't list devices, has it been removed for ios 15.4?
Not sure Luiz, will need to check the documentation
Hello Friend! Your lectures are great!
I have a question, is it possible to perform automatic tests using Appium, for the iOS native application after watching all your lectures, without prior knowledge of programming languages and testing tools?
I saw that it is possible for Appium to "remember" the steps that the tester goes through himself?
Hi Dragan, yes, you can do automation testing on iOS native apps
@@RaghavPal without prior programming knowledge?
Yes, as long as you are ready to learn new things
@@RaghavPal Right, of course. Thank you man, and thank you for the knowledge sharing!
I'm getting the below error
An unknown server-side error occurred while processing the command. Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'carthage bootstrap --platform iOS\,tvOS' exited with code 1
Hi Shailendra, this can help github.com/appium/appium/issues/14213
github.com/appium/appium/issues/13532
Hello,
I am able to solve all issue and script is working fine when I use my free apple id account. but, after signing with the developer account I am unable to install WebDriverAgent on the real device.
On running xcodebuild -project WebDriverAgent.xcodeproj -scheme WebDriverAgentRunner -destination 'id=' test
my terminal is stuck at a point where it says "WebDriverAgentRunner-Runner[669:141632] Using singleton test manager
" and later (~30-40 minutes)i get an error
Testing failed:
WebDriverAgentRunner:
testRunner encountered an error (Encountered a problem with the test runner after launch. (Underlying error: Lost connection to DTServiceHub))
Hi Rajat, I could not find any proper solution for this. I saw your stackoverflow question and have upvoted it. Hopefully we may get some response there
stackoverflow.com/questions/59510846/unable-to-install-webdriveragent-on-real-device-using-developer-account#
I am getting below error when executing "npm install appium" . Please suggest
npm ERR! code ENOENT
npm ERR! syscall chmod
npm ERR! path /usr/local/lib/node_modules/appium/build/lib/main.js
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, chmod '/usr/local/lib/node_modules/appium/build/lib/main.js'
npm ERR! enoent This is related to npm not being able to find a file.
this can be due to corruption on appium packages.
You can try to
1. Delete node_modules folder manually.
2. Install Node ( nodejs.org/en/download )
3. Install appium (check with a diff ver)
Hi Raghav. Need help please.
Getting error as ------------------- Building scheme "iOS Framework" in CocoaAsyncSocket.xcodeproj. Build Failed. Task failed with exit code 1 ........ after running ./Scripts/bootstrap.sh -d command on Terminal
XCode Command Line Tools & Carthage is already installed.
Mac OS: Catalina
XCode: 12
Appium: 1.12.1
Hi Kedar, pls check this - github.com/appium/appium/issues/14703
Dear Raghav, I am trying to automate iOS application using appium. I have done setting up in Xcode ( Performed clean, build and ran ) for the integration app to my real device and I observed the Integration app is installed into my real iphone 11 ( iOS version : 13.4) and then I checked for WebAgentRunner but it is not installed using xcode and later when I tried to connect to same real device using appium and trying to deploy my real app , I can install using appium but there are some issues which is provided in details log here :
uitting and uninstalling WebDriverAgent
[XCUITest] Shutting down sub-processes
[XCUITest] No WDAs on the device.
[XCUITest] Error: Unable to launch WebDriverAgent because of xcodebuild failure: Trying to use WebDriverAgent project at '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj' but the file does not exist. Make sure you follow the tutorial at github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[XCUITest] at quitAndUninstall (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:527:15)
[XCUITest] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:557:11
[XCUITest] at wrapped (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:35:13)
[XCUITest] at retry (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:18:13)
[XCUITest] at retryInterval (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:45:10)
[XCUITest] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:537:7
[DevCon Factory] Releasing connections for 00008030-000E0D542E22802E device on any port number
[DevCon Factory] Found cached connections to release: ["00008030-000E0D542E22802E:8100"]
[DevCon Factory] Releasing the listener for '00008030-000E0D542E22802E:8100'
[DevCon Factory] Cached connections count: 0
[XCUITest] Not clearing log files. Use clearSystemFiles capability to turn on.
[BaseDriver] Event 'newSessionStarted' logged at 1608014823112 (12:17:03 GMT+0530 (India Standard Time))
[MJSONWP] Encountered internal error running command: Error: Unable to launch WebDriverAgent because of xcodebuild failure: Trying to use WebDriverAgent project at '/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj' but the file does not exist. Make sure you follow the tutorial at github.com/appium/appium-xcuitest-driver/blob/master/docs/real-device-config.md. Try to remove the WebDriverAgentRunner application from the device if it is installed and reboot the device.
[MJSONWP] at quitAndUninstall (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:527:15)
[MJSONWP] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:557:11
[MJSONWP] at wrapped (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:35:13)
[MJSONWP] at retry (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:18:13)
[MJSONWP] at retryInterval (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/asyncbox/lib/asyncbox.js:45:10)
[MJSONWP] at /Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:537:7
[HTTP] DELETE /wd/hub/session
[HTTP] {}
[HTTP] No route found. Setting content type to 'text/plain'
[HTTP]
Hi Deep, not very sure on the exact solution, here is a discussion on this github.com/appium/appium/issues/8346
Hi. I have done the real device setup for iOS devices automation. While clicking on build it is able to install webdriveragent in iphone 6s and iphone x but though the build gets succeed for iPad but it doesn't install webdriveragent
It would be great if u can help in this regard. Another problem is some phones got updated to 12.2 or more ios versions and that is now not working with xcode 10.13.6.
Hi Java, I will check and try to put a video soon on this
Thanks Raghav .waiting for your upcoming video
Getting Failed to create provisioning file for WebDriverAgentRunner even after changing the name multiple times. Please help
Hi Shashank, pls check this stackoverflow.com/questions/40484957/appium-error-xcode-couldnt-find-a-provisioning-profile-matching-com-facebook-w
Hi Raghav,
I followed every step and my build failed on Terminal, 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.
Hi Sai, was the device locked during execution, Also check if USB debugging is one. You can also check online for your specific device ver, in case any extra settings are required
Why not you show step 9 for Appium for Desktop and I am getting the error as "Failed to create provisioning profile" after changing the product bundle identifier as per your instruction. I opened the WebDriverAgent.xcodeprej from appium desktop folder. Can you tell me the solution?
Hi Pankaj, Go to WebDriverAgentRunner -> Build Settings -> Build Settings -> Packaging -> Product Bundle Identifier and change it. After changing clear the project and rebuild it.
stackoverflow.com/questions/40484957/appium-error-xcode-couldnt-find-a-provisioning-profile-matching-com-facebook-w
github.com/appium/appium/issues/8144
Very Useful. Thank you for this
You're welcome Supriya
Hi Raghav, Could you please make a video on what kind of SDK for iOS devices can be installed on Windows for iOS mobile Testing ? Thanks
I will check and prepare Sai
@@RaghavPal Thank you :)
Thank you very much, the next video
You're welcome Didier. Will get all here - czcams.com/play/PLhW3qG5bs-L8npSSZD6aWdYFQ96OEduhk.html
It really helps me, thanks@Raghav for your great video.
But I have a problem when connecting to real device, it can not be install .app file, but works fine with .ipa file. Do you have any idea on this?
Hi Hải, what is the error message you are getting.
while running this command ./Scripts/bootstrap.sh -d its displays as -bash: ./scripts/bootstrap.sh: No such file or directory. Please help me to resolve this.
Hi Yeltsin,
Try to reinstall carthage with brew
brew uninstall carthage
brew install carthage
Do you have video similar like that but with implementation real device (iPhone)?
Hi Patrycja, not on real device iPhone as of now
@@RaghavPal will solutions from this video work for real devices also? What you think? 🤔
I have not tried, but I believe it will help
I have this running. But how do I add my own ipa file to this and run it?
Hi Arwaa, you can upload your file on mobile and get its id
discuss.appium.io/t/how-to-install-ipa-file-using-appium-code/11383
Hello Raghav Can we automate iOS ipa with Appium in the Windows operating system using Simulator Or any other way to run ipa using window without having MAC devices...?
Hi Zulfiqar, you will need to have some iOS agent. You can check Appium Studio or TestProject for this
@Raghav , i cant find bootstrap.sh inside the appium-webdriveragent /Resource ,
Try to reinstall carthage with brew
brew uninstall carthage
brew install carthage
Hello Raghav , can I get appium set up for real iOS devices?
Hi Abhinandan, I have given some tips in the video description. Will do a separate video soon.
yes, please have a look this video - czcams.com/video/lrA6zYikFA4/video.html
Also allow Appium permission in MacOS settings->security & privacy->general
See more: support.apple.com/en-in/HT202491
Thanks for adding Harsh
Hi Raghav, I was able to solve the webdriveragent app not getting installed in simulator as build was getting failed. Now I have added a .app file in capabilities and clicked on start session which inturn started to uninstall and install the WebDriverAgent app continously. Can you please help on this?
Manikant
The issue you are facing is that the Appium driver is trying to uninstall and reinstall the WebDriverAgent app continuously. This is likely because the Appium driver is not able to find the WebDriverAgent app in the simulator.
To fix this issue, you need to make sure that the WebDriverAgent app is installed in the simulator. You can do this by following these steps:
1. Open the Xcode project for the WebDriverAgent app.
2. In the project navigator, select the target for the WebDriverAgent app.
3. In the General tab, make sure that the "Deployment Target" is set to the version of iOS that you are using for the simulator.
4. Click on the "Build" button to build the WebDriverAgent app.
5. In the simulator, click on the "Debug" menu and select "Simulate Device."
6. In the simulator, click on the "File" menu and select "Install App."
7. Browse to the location of the WebDriverAgent app and select it.
Once the WebDriverAgent app is installed in the simulator, the Appium driver should be able to find it and start a session.
If you are still having trouble getting the Appium driver to work, you can try the following:
* Make sure that you are using the latest version of the Appium driver.
* Make sure that you are using the correct version of the WebDriverAgent app for the version of iOS that you are using.
* Check the logs for any errors.
* Contact the Appium support team for help.
Here are some additional things you can try:
* Make sure that the WebDriverAgent app is signed with the correct provisioning profile.
* Make sure that the WebDriverAgent app is installed in the correct location.
* Try restarting the simulator.
* Try using a different simulator.
* Contact Apple support for help.
I hope this helps
@@RaghavPal Fixed this issue by updating the webdriveragent. Thank you
Hi Ragahav.When I try to open the WebdriverAgent.xcode project its showing error- Two xcode in my system-Xcode 10.1(defalut) and Xcode9.4.1 .Tried with two but not opening. With 9.4.1 its showing the below error -
The project at '/usr/local/lib/node_modules/appium/node_modules/appium-webdriveragent/WebDriverAgent.xcodeproj' cannot be opened because it is in a future Xcode project file format. Adjust the project format using a compatible version of Xcode to allow it to be opened by this version of Xcode.
With 10.1-Nothing is happening . I moved this from application to trash.
I need to open in xcode9.4.1. Can you please help on this ?
Hi Hari, If this is version issue, see if this helps - github.com/facebookarchive/WebDriverAgent/issues/902
Hi Raghav,
Thanks for creating very easy and helpful tutorial.
I followed the video and I am able to setup with IOS real Device but now my iPad version updated so from 14.4 to 14.6 because of update I am getting unsupported OS version. Could you please help me out what could be the root to fix the issue .
Thanks in advance.
Hi Ajeet, I will need to check on this, Try some online help too
@@RaghavPal Hi Raghav,
I tried to get help from online or some other sites but didn't get any proper solution.
I will check more
I found XcuiDriver agent using this command
"/opt/homebrew/lib/node_modules/appium/node_modules/appium-webdriveragent" may be path is little changed during time
May be, glad to know it worked
Hi , How to resolve this error . "Original error: Unable to launch WebDriverAgent because of xcodebuild failure: Command 'Scripts/bootstrap.sh -d' exited with code 1" ? Thanks
Hi Tessin, I was checking on this and got these 2 responses:
1. I had the same problem. Please try importing the web driver agent dependencies. In terminal cd into the "Appium.app/contents/resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/webdriveragent" directory and run: ./Scripts/bootstrap.sh
I have tried this and I am getting another error but suspect it is related to my local environment so the bootstrap.sh script may be all you need.
2. Solved. After degrade Appium to v1.7.1, everything is worked as usual
Is running the WebDriverAgent project in xcode relevant to ios appium java testing? I mean is it needed? whats the importance of it?
XCode provides the capabilities to connect, profile and debug with iOS devices
Your entire videos or sessions are purely based on installation and download but not for how to use appium with certain application and how to automate them like drag drop, calender, reports, each and every functionality we can automate.
Hi Amit, I understand your concern, I will be adding more videos to this, This was created as a very basic, beginners playlist for appium, Will add more sessions
@@RaghavPal Thanks for your revert !!!! Hope we got the same ASAP....😉
In Appium 1.21.0, you don’t need to run sh ./Scripts/bootstrap.sh. ..is it true???
I will need to check on that
It is true
without running the command " ./Scripts/bootstrap.sh -d" i am able to find "WebDriverAgent.xcodeproj" and its getting open in xcode ,is it necessary to run this command ?
Hi Rahul, try to complete all the steps. If you are able to do it, it should be fine
Looks like the WebDriveragent folder doesnt exist in 2022 ( at least not in that path), does anybody know if its been moved or if there is an extra step now to get it? Thanks
I will check, meanwhile can refer new online resources
Hello, I have an automation script set up and running with the above set up. Any idea how I can integrate the script in a pipeline, the catch being that the app I'm testing requires hardware sim card dependability. Thanks in advance
Try some CI CD tool like Jenkins, Can get all tutorials here - automationstepbystep.com/
Raghav can you please us know. Can we automate published app and enterprise app ?
Hi Sanjeet, you will need the .app or .ipa file. And if you have access and permission for that, can use it
Thank you, I have not time to pratice it now, but your explanation very neat and usefull.
So happy to know this Edson. Pls do the hands-on
Awesome!! Thanks! you are GREAT!!.
Thanks Blue