appium在真机上运行IOS实例要注意的几点包括python和java运行log 和部分关键代码Word格式.docx
- 文档编号:12981571
- 上传时间:2022-10-01
- 格式:DOCX
- 页数:11
- 大小:15KB
appium在真机上运行IOS实例要注意的几点包括python和java运行log 和部分关键代码Word格式.docx
《appium在真机上运行IOS实例要注意的几点包括python和java运行log 和部分关键代码Word格式.docx》由会员分享,可在线阅读,更多相关《appium在真机上运行IOS实例要注意的几点包括python和java运行log 和部分关键代码Word格式.docx(11页珍藏版)》请在冰豆网上搜索。
TestApp.app"
capabilities.setCapability("
app"
app.getAbsolutePath());
appium真机上运行:
运行的时候要将APP安装到真机上面
2:
运行的时候,不能再开instrument
3:
命令行里面启动的时候,参数写错了应该是appium-U3d2cad7288a64a5445aa98a2cc220132f2cddd1c--appio.appium然后代码里面app=bundleID,如以下例子中:
"
io.appium.TestApp"
而不是那个很长的路径,其中-U参数后面是真机的uuid,可以打开xcode,在windows下的organise下找到,一般mac连接上ipad后会有绿色圆点现在贴上真机上运行Python实例:
Kingsons-MacBook:
Studykingson$appium-U1a601f5cd791bc379115095fc81cd69b096582a3--appcom.telenavsoftware.doudouy
info:
WelcometoAppiumv0.11.4(REVb04decd191002628c88e9bf475553da1cd04a036)
AppiumRESThttpinterfacelistenerstartedon0.0.0.0:
4723
info-socket.iostarted
debug:
Appiumrequestinitiatedat/wd/hub/session
Requestreceivedwithparams:
{"
sessionId"
:
null,"
desiredCapabilities"
{"
device"
"
iPhoneSimulator"
"
platform"
Mac"
browserName"
iOS"
version"
7.0"
com.telenavsoftware.doudouy"
}}
AppisaniOSbundle,willattempttorunaspre-existing
Creatingnewappiumsessiona36fdf63-9b22-48a4-bb01-4b44ddb54aff
Removinganyremaininginstrumentssockets
Cleanedupinstrumentssocket/tmp/instruments_sock
Cleaningupanytracedirs
Notracedirstocleanup
Localizable.stringsisnotcurrentlysupportedwhenusingrealdevices.
Notsettingdevicetypesincewe'
reconnectedtoadevice
StartingiOSdevicelogcaptureviaidevicesyslog
Realdevicespecifiedbutnoipa,assumingbundleIDisondevice
Creatinginstruments
instrumentsis:
/Applications/Xcode.app/Contents/Developer/usr/bin/instruments
[INSTSERVER]Instrumentssocketserverstartedat/tmp/instruments_sock
AttemptingtorunapponrealdevicewithUDID1a601f5cd791bc379115095fc81cd69b096582a3
Spawninginstrumentswithcommand:
/Applications/Xcode.app/Contents/Developer/usr/bin/instruments-t/Applications/Xcode.app/Contents/Applications/Instruments.app/Contents/PlugIns/AutomationInstrument.bundle/Contents/Resources/Automation.tracetemplate-w1a601f5cd791bc379115095fc81cd69b096582a3com.telenavsoftware.doudouy-eUIASCRIPT/usr/local/lib/node_modules/appium/lib/devices/ios/uiauto/bootstrap.js-eUIARESULTSPATH/tmp/appium-instruments/
Andextrawithout-delayenv:
{}
Andlaunchtimeout:
90000ms
[INSTSTDERR]2013-12-1010:
40:
22.536instruments[53424:
507]Connectiontotheremotedevicelostwhilelaunchingtarget.Aborting...
22.539instruments[53424:
507]Recordingcancelled:
Atleastonetargetfailedtolaunch;
abortingrun
[INSTSTDERR]InstrumentsTraceError:
ErrorDomain=com.apple.instrumentsCode=1"
ErrorStartingRecording"
UserInfo=0x7ff6d308f220{NSLocalizedDescription=ErrorStartingRecording,NSLocalizedRecoverySuggestion=Atleastonetargetfailedtolaunch;
abortingrun}
InstrumentsTraceError:
Failedtostarttrace.
[INSTSERVER]Instrumentsexitedwithcode253
error:
Instrumentsdidnotlaunchsuccessfully,failingsession
Cleaningupappiumsession
FailedtostartanAppiumsession,errwas:
Error:
Instrumentsdidnotlaunchsuccessfully--pleasecheckyourapppathsorbundleIDsandtryagain
Respondingtoclientwitherror:
status"
33,"
value"
message"
Anewsessioncouldnotbecreated.(Originalerror:
Instrumentsdidnotlaunchsuccessfully--pleasecheckyourapppathsorbundleIDsandtryagain)"
origValue"
Instrumentsdidnotlaunchsuccessfully--pleasecheckyourapppathsorbundleIDsandtryagain"
},"
null}
POST/wd/hub/session5006015ms-342b```
我的部分代码片段:
```python
classTestSequenceFunctions(unittest.TestCase):
defsetUp(self):
#setupappium
app="
#app=os.path.join(os.path.dirname(__file__),
#'
../../apps/DDY/build/'
DouDouY.app'
)
#app=os.path.abspath(app)
self.driver=webdriver.Remote(
command_executor='
http:
//127.0.0.1:
4723/wd/hub'
desired_capabilities={
'
browserName'
iOS'
device'
iPhoneSimulator'
platform'
Mac'
version'
7.0'
app'
app
})```
1.启动Appium时,保证你的Real
Device的UDID和你的应用的BundleID正确
2.确保你的应用可以安装到你的真机上
3.安装后请断开与Xcode的连接
4.确保Mac上没有启动Instruments工具以下是JAVA真机运行log:
devexus-iMac:
builddevexu$
appium-U3d2cad7288a64a5445aa98a2cc220132f2cddd1c--appio.appium
WelcometoAppiumv1.1.0(REVe433bbc31511f199287db7724e1ce692bcb32117)
socket.io
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- appium在真机上运行IOS实例要注意的几点包括python和java运行log 和部分关键代码 appium 真机上 运行 IOS
![提示](https://static.bdocx.com/images/bang_tan.gif)
链接地址:https://www.bdocx.com/doc/12981571.html