Android/iOS Remote debugging
简单介绍
使用下面方法可以定位webview中的元素,无法定位view中的元素。
原文地址:http://mp.weixin.qq.com/s/y_UfdgjT_pkKgYivJmqt7Q
webview定位
如下图,Hybrid APP有webview,在定位webview element的时候,如果使用的是DDMS,会发现压根儿都找不到相关的elements而只能找到一个webview控件。
遇到这种情况,DDMS和Android uiautomatorviewer 毫无用武之地,这个时候就需换别的工具。对于Android来说,可以使用chrome自带的dev tools;对于iOS来说,也可以使用safari自带的工具来进行remote debugging。
Android Remote Debugging 三部曲
要使用remote debug,分三步走:
a. 配置好Android SDK,并设置好环境变量,保证adb命令正常使用。
b. 连接设备,可以是真机,也可以是模拟器,需要提醒的是你本机chrome的版本与到你设备中webview版本有关系,如果你开启remote debugging 白屏,要尝试一下使用高版本的Android版本或者降低你本机chrome版本。
连接设备后,需要用:adb devices验证设备连接
c.打开chrome在地址栏输入:chrome://inspect/
同时打开带webview的 app,连接设备后的图如下:
打开DevTool 和设备之后的截图如下:
chrome DevTools 如果你之前用过,那么现在用的方法和原来一样。截图
Android/iOS Remote debugging的更多相关文章
- Android WebView remote debugging
/***************************************************************************** * Android WebView rem ...
- 通过Chrome浏览器进行android调试/Remote Debugging on Android with Chrome
The way your web content behaves on mobile can be dramatically different from the desktop experience ...
- iOS remote debug & Android remote debug & Chrome & APP
iOS remote debug & Android remote debug & Chrome & APP iOS remote debugging 如何在 iOS 真机上调 ...
- Remote Debugging Android Devices
Remote Debugging Android Devices //在电脑上远程调试安卓设备 By Kayce Basques Technical Writer at Google By Meggi ...
- 安卓手机移动端Web开发调试之Chrome远程调试(Remote Debugging)
一.让安卓打debug模式的apk包 二.将电脑中的chrome升级到最新版本,在chrome浏览器地址栏中输入chrome://inspect/#devices: 在智能手机还未普及时,移动设备的调 ...
- 在chrome 总调试cordova出现Detached from the target. Remote debugging has been terminated with reason: Connection lost. Please re-attach to the new target
在chrome 总调试cordova出现如下错误: "Detached from the target. Remote debugging has been terminated with ...
- Delphi APP 開發入門(二)Android/iOS設定,Hello World
Delphi APP 開發入門(二)Android/iOS設定,Hello World 分享: Share on facebookShare on twitterShare on google_plu ...
- fiddler 进行Android/IOS代理配置抓包
1.准备:Android+IOS设备 下载:fiddler抓包工具,不是最新版的链接: 链接:https://pan.baidu.com/s/1BaBfu2H4xgpsh1wmkfC8aQ ...
- React Native hot reloading & Android & iOS
React Native hot reloading & Android & iOS https://facebook.github.io/react-native/docs/debu ...
随机推荐
- Android Studio 中.android 文件夹移动默认位置
转自 开发工具打造: .android 文件夹移动默认位置 .android 文件夹是用来存放 avd 模拟器文件的文件夹. 因为默认是 C盘 的. 占用空间比较大.很不爽 将它移动到其它盘其实很简单 ...
- uiaotumator ui測试 高速调试
1. uiaotumator ui測试 Demo.java package uiautomatorDemo1; import java.io.File; import android.graphics ...
- 代码篇之AOP框架
AopFrameworkTest类 public class AopFrameworkTest { public static void main(String[] args) throws Exce ...
- TensorFlow笔记三:从Minist数据集出发 两种经典训练方法
Minist数据集:MNIST_data 包含四个数据文件 一.方法一:经典方法 tf.matmul(X,w)+b import tensorflow as tf import numpy as np ...
- android listView 滑动载入数据 该数据是服务端获取的
package com.sunway.works.applycash; import java.util.ArrayList; import java.util.Calendar; import ja ...
- 【Python】matplotlib绘制折线图
一.绘制简单的折线图 import matplotlib.pyplot as plt squares=[1,4,9,16,25] plt.plot(squares) plt.show() 我们首先导入 ...
- 转:css:Position
http://www.cnblogs.com/polk6/archive/2013/07/26/3214847.html http://blog.sina.com.cn/s/blog_4bcf4a5e ...
- Android · 广告走灯
layout <?xml version="1.0" encoding="utf-8"?> <RelativeLayout xmlns:and ...
- RF --系统关键字开发
需求: 接收一个目录路径,自动遍历目录下以及子目录下的所有批处理(.bat) 文件并执行. 首先在..\Python27\Lib\site-packages 目录下创建 CustomLibrary 目 ...
- android:scrollbar的一些属性
1. activity_maim.xml <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android ...