首页 > 解决方案 > What is difference between getting adb logcats from appium by `getAll()` and `filter(Level.ALL)`

问题描述

Can anyone differentiate between

  1. List<LogEntry> logEntries = driver.manage().logs().get("logcat").getAll(); and
  2. List<LogEntry> logEntries2 = driver.manage().logs().get("logcat").filter(Level.ALL);

Actually my need to is to clear logEntries after performed any click action on my app. Then i ran adb logcat -c command to clear those and again called List<LogEntry> logEntries = driver.manage().logs().get("logcat").getAll(); ideally it should give fresh logs as per i have cleared logs by adb logcat -c, but it doesn't. Then i performed List<LogEntry> logEntries2 = driver.manage().logs().get("logcat").filter(Level.ALL); which is giving the fresh data after successful execution of adb logcat -c. So can anyone differentiate.

标签: seleniumappiumlogcat

解决方案


推荐阅读