Background
Since the start of the iOS, then the first step is to run the demo to see the effect, "Appium learning-First Glimpse" in the text has already put the official demo run up. Now it's time to do something else.
Inspector Problems
Inspector is a tool used by the Appium client to probe the layout of iOS elements. Of course Android is also available, but Android generally uses uiautomatorviewer.
But I encountered a problem when I was using it:
Could not start a new session
Be sure the Appium server was running with a application opened by using the ' App Path ' parameter in Appium.app (along wit H package and activity for Android) or by connecting with selenium client and supplying the desired capabilities O Bject.
Strange, my Appium is the latest version, Xcode is the newest, including the simulator is also the newest, why will report this strange mistake. Look at the meaning of this error, because I did not configure my app on the app path, but I have already made the configuration, and I did not encounter such a problem when running the demo.
Solution Solutions
A problem of course is to find the almighty Google. However, during the search process, although a lot of people encounter similar problems, but basically the port is not configured to. There is basically no solution to the problem.
Finally, there is no way, can only bite the bullet to see the diary. The log is very long, I do not post all, paste a key place.
[MJSONWP] Calling Appiumdriver.createsession () with args: [{"PlatformName": "IOS", "platformversion": "8.4", "app": "/users/ Svenweng/library/developer/xcode/deriveddata/hlsc_ios-bdhwxwdycvlcikacthovhpujxicb/bui ...
[Appium] Creating New Iosdriver Session
[Appium] Capabilities:
[Appium] PlatformName: ' IOS '
[Appium] platformversion: ' 8.4 '
[Appium] App: '/users/svenweng/library/developer/xcode/deriveddata/hlsc_ios-bdhwxwdycvlcikacthovhpujxicb/build/ Products/debug-iphonesimulator/hlsc_ios.app '
[Appium] automationname: ' Appium '
[Appium] devicename: ' IPhone 5s '
[Appium] Showioslog:true
[Debug] [IOS] Not auto-detecting Udid.
[Basedriver] Using The local app '/users/svenweng/library/developer/xcode/deriveddata/hlsc_ios-bdhwxwdycvlcikacthovhpujxicb/build/ Products/debug-iphonesimulator/hlsc_ios.app '
[Debug] [Instruments] Available devices:apple TV 1080p (9.2) [44F8DE38-FF72-45B7-9ACA-3F672B6379F1] (Simulator), IPad 2 (9.3) [ 816AE53B-02BA-4DE2-9BB3-55DDAF2783B1] (Simulator), IPad Air (9.3) [cd83edc1-16ee-46a0-bc05-2af844f9021d] (Simulator) , ipad Air 2 (9.3) [F830CC23-169D-4785-9867-EFE168E91FCD] (Simulator), ipad Pro (9.3) [ 1376C2E1-A56F-4E43-AF59-A4EEB981DC63] (Simulator), IPad Retina (9.3) [926eee63-64c6-4c82-ade4-e0a3e6e87d0d] ( Simulator), iphone 4s (9.3) [0a818680-510e-4971-a61c-6959aa8257c1] (Simulator), iphone 5 (9.3) [ 663A8C62-2E93-438F-970C-FFB4BF7D549B] (Simulator), IPhone 5s (9.3) [39d1c620-d85c-4dc7-9f52-6e765a5cd764] (Simulator ), iphone 6 (9.3) [AF7A72E9-E886-438E-80D7-BAF53AEDFFD5] (Simulator), iphone 6 Plus (9.3) [ E23435AA-1E56-4503-A3D8-C8E313412EB7] (Simulator), IPhone 6s (9.3) [0dfb756b-a5a0-48ae-bb02-6a5baf32ba89] (Simulator ), iphone 6s (9.3) + Apple watch-38mm (2.2) [8f013a8c-94b3-4a86-8573-fde9d36a1dec] (Simulator), iphone 6s Plus (9.3) [1263 74fa-1277-4cce-9aa0-3255e9d5c3(Simulator), IPhone 6s Plus (9.3) + Apple watch-42mm (2.2) [da74ee00-66f5-41f8-b659-995d49354e8f] (Simulator)
[IOS] Error:could not find a device to launch. You requested ' IPhone 5s (8.4) ', but the available devices were: ["Apple TV 1080p (9.2) [44f8de38-ff72-45b7-9aca-3f672b637 9F1] (Simulator) "," ipad 2 (9.3) [816ae53b-02ba-4de2-9bb3-55ddaf2783b1] (Simulator) "," ipad Air (9.3) [ CD83EDC1-16EE-46A0-BC05-2AF844F9021D] (Simulator) "," IPad Air 2 (9.3) [F830CC23-169D-4785-9867-EFE168E91FCD] ( Simulator) "," ipad Pro (9.3) [1376c2e1-a56f-4e43-af59-a4eeb981dc63] (Simulator) "," ipad Retina (9.3) [ 926EEE63-64C6-4C82-ADE4-E0A3E6E87D0D] (Simulator) "," IPhone 4s (9.3) [0A818680-510E-4971-A61C-6959AA8257C1] ( Simulator) "," iphone 5 (9.3) [663a8c62-2e93-438f-970c-ffb4bf7d549b] (Simulator) "," iphone 5s (9.3) [ 39D1C620-D85C-4DC7-9F52-6E765A5CD764] (Simulator) "," IPhone 6 (9.3) [AF7A72E9-E886-438E-80D7-BAF53AEDFFD5] ( Simulator) "," iphone 6 Plus (9.3) [E23435aa-1e56-4503-a3d8-c8e313412eb7] (Simulator) "," iphone 6s (9.3) [ 0dfb756b-a5a0-48ae-bb02-6a5baf32ba89] (Simulator) "," IPhone 6s (9.3) + Apple watch-38mm (2.2) [8f013a8c-94B3-4A86-8573-FDE9D36A1DEC] (Simulator) "," IPhone 6s Plus (9.3) [126374fa-1277-4cce-9aa0-3255e9d5c378] (Simulator) " , "IPhone 6s Plus (9.3) + Apple watch-42mm (2.2) [da74ee00-66f5-41f8-b659-995d49354e8f] (Simulator)"]
It's best to look at the logs to solve the problem. The above log can clearly explain the problem.
The first paragraph describes the configuration of the start inspector, the key is that the version is given to 8.4.
The second section of the log shows that Udid is not specified, which means we use the simulator to test and give the address of a simulator app.
The third section of the log lists all the available emulators on my Mac.
The fourth paragraph gave an error. Could not find the corresponding device boot, device information specified in the first paragraph, the version number is 8.4 iphone5s simulator, but my device only 9.3 version.
See here, basically the problem is clear. Issue caused by incorrect version. The Appium client inspector up to only 8.4 of the version. So just go to Xcode and download the 8.4 version simulator. Success is as follows:
At last
Summary, encounter problems or look at the log more reliable, although the log seems to be a lot of things, very cumbersome, but often can help you solve the problem of the place, or these logs.
Appium Study-About inspector