This chapter describes how to configure iOS automation on the iOS real machine and how to solve the faQs when you perform automation on the iOS real machine.
Capability used by the real machine
Different from the emulator, the real test requires the following Capability method: Set the App path and start the App (automatically install the App)
{ "app": "/Users/seveniruby/Library/Developer/Xcode/DerivedData/UICatalog-ftyzdbgapjmxxobezrnrxsshpdqh/Build/Products/Debug-iphon eos/UICatalog.app", "automationName": "XCUITest", "platformName": "ios", "xcodeOrgId": "xxxxxx", "xcodeSigningId": "iPhone Developer", "udid": "9df22446af15919c494c85b4c1c8b00eaa3a5bd0" }Copy the code
Method 2: Start the App based on the App package name
{
"platformName": "ios",
"bundleId": "com.example.apple-samplecode.UICatalog",
"automationName": "XCUITest",
"deviceName": "iPhone",
"udid": "auto",
"xcodeOrgId": "xxxxx",
"xcodeSigningId": "iPhone Developer"
}
Copy the code
Verify the environment using Appium Desktop
After the preceding steps are complete, the following figure shows that the real computer environment is successfully configured
Q&A
Problem a
Failed to register bundle identifier
- Reason: There are duplicate bundle identifiers
- Solution: Set it to unique
Question 2
Environmental ethics ethics ethics ethics Ethics ethics ethics ethics ethics ethics ethics ethics ethics ethics ethics ethics ethics ethics ethics tool ‘instruments’ requires Xcode, but active developer directory ‘/Library/Developer/CommandLineTools’ is a command line tools instance
- Cause: Xcode is installed, but not in the default directory of the system.
- To change the Xcode path to your installation location, run sudo xcode-select –switch /Applications/ xcode.app
Question 3
When the script is stopped manually, Showing All Messages webDriveragentrunner-runner. App (3413) Encountered an error (Early unexpected exit, operation never finished bootstrapping – no restart will be attempted. (Underlying error: The test runner exited with code 74 before checking in.))
- Solution: Reboot your phone or unplug the IOS cable and reconnect to your computer
Problem four
note: Using new build system note: Building targets in parallel note: Planning build note: Constructing build description error: No signing certificate "iOS Development" found: No "iOS Development" signing certificate matching team ID "L62JHCGMQW" with a private key was found. (in target 'WebDriverAgentLib' from project 'WebDriverAgent') error: No profiles for 'com.facebook.WebDriverAgentRunner.xctrunner' were found: Xcode couldn't find any iOS App Development provisioning profiles matching 'com.facebook.WebDriverAgentRunner.xctrunner'. Automatic signing is disabled and unable to generate a profile. To enable automatic signing, pass -allowProvisioningUpdates to xcodebuild. (in target 'WebDriverAgentRunner' from project 'WebDriverAgent')Copy the code
- Cause: The mobile phone is not rebuilt after replacement.
- Solution: Replace the phone and rebuild WDA, then click Test to install WDA
Problem five
Assertions: System: Early unexpected exit, operation never finished bootstrapping - no restart will be attempted. (Underlying Error: The test runner exited with code 74 before checking in. If you believe this error represents a bug, please attach the result bundle at /Users/dzkair/Library/Developer/Xcode/DerivedData/WebDriverAgent- Alwvnomvwrdtzoaxbbkniqrpcdpp/Logs/Test/Test - WebDriverAgentRunner - 2020.11.26 _10-47-38 - + 0800. Xcresult)Copy the code
- Solution: Plug and unplug your phone
These are the most frequently asked questions. If you have any other questions, please leave a comment below
The original link
For more technical articles to share and free materials to collect click on: ‘qrcode.testing-studio.com/f?from=juej…
For more technical articles to share and free materials to pick up click on the link