2017-11-09 9 views

答えて

0

あなたは、デバイスのパフォーマンスデータを取得することができappium 1.6以降で:詳細については

List<String> dataTypes = new ArrayList<String>(); 
dataTypes.add("cpuinfo"); 
dataTypes.add("memoryinfo"); 
dataTypes.add("batteryinfo"); 
dataTypes.add("networkinfo"); 
// check what data type you can get 
List<String> supportedPerformanceDataTypes =driver. 
    getSupportedPerformanceDataTypes(); 
// get data 
List<List<Object>> performanceData =driver. 
    getPerformanceData("your.app.package", "dataType", dataReadTimeout); 

repositoryだからAppiumであなただけのバッテリーの状態を取得し、その変化かどうかを確認することができますappiumに行きます。

+0

このコードを実行しているときにエラーが発生しました... "main"というスレッドでorg.openqa.selenium.UnsupportedCommandException:URLが有効なJSONWPリソースにマップされていません.. – chandru

+0

エラーを解決しました。どんな情報も得ていません。[cpuinfo、memoryinfo、batteryinfo、networkinfo]のような応答を返してください。 – chandru

+0

情報のおかげで今私はバッテリーの情報を得ることができます。私はdriver.getSupportedPerformanceData()メソッドを使用しています。 – chandru

関連する問題