[英]How to select a value from IOS spinner using java selenium and appium
[英]Appium - How to read log from iOS device using java
我正在尝试使用appium和java自动化iOS应用测试。 我能够在/Users/xyz/Library/Logs/CoreSimulator/158d9eddabcdefyt586a334136/system.log中读取为模拟器生成的日志文件
在真实设备上运行测试时,在哪里可以找到日志? 我看到目前唯一的方法是在xcode上。
有人面对过这个问题并且可以指导我吗?
这可能会有所帮助[肯定可以在Android中运行]:
List<LogEntry> logEntries = driver.manage().logs().get("logcat").getAll();
for (LogEntry entry : logEntries) {
if (entry.getMessage().contains(event)) { //
System.out.println("Found the logs looking for.");
}
}
进一步挖掘,我会发现这可能对课程有帮助:
package io.appium.java_client.service.local.flags;
public enum IOSServerFlag implements ServerArgument{
...
/**
* if set, the iOS system log will be written to the console<br/>
* Default: false
*/
SHOW_IOS_LOG("--show-ios-log"),
...
}
它也在这里: http : //appium.io/slate/en/master/?ruby#server-flags
如果要查看日志,则可以使用libimobiledevice库或Lemonjar。 Libimobiledevice比柠檬罐好得多。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.