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 wifi 调试
(一)root你的Android(相信绝大多数人现在的手机已经ROOT了.(二)下载app: adbWireless,并安装到手机上.(三)安装adb工具包,其实,要在windows下使用ADB工具, ...
- 【hibernate】主键生成策略使用UUID报出如下警告:org.hibernate.id.UUIDHexGenerator - HHH000409: Using org.hibernate.id.UUIDHexGenerator which does not generate IETF RFC 4122 compliant UUID values;
主键生成策略使用UUID报出如警告如下: 控制台- 2017-11-24 18:40:14 [restartedMain] WARN org.hibernate.id.UUIDHexGenerator ...
- 使用Eclipse Memory Analyzer进行内存泄漏分析三部曲
源地址:http://seanhe.iteye.com/blog/898277 一.准备工作 分析较大的dump文件(根据我自己的经验2G以上的dump文件就需要使用以下介绍的方法,不然mat会出现 ...
- windows下用vscode写C++
[本文参考:https://www.cnblogs.com/zhuzhenwei918/p/9057289.html 和 https://www.zhihu.com/question/3031589 ...
- T4模板编辑器
一 二.工具 (T4模板编辑器) 使用效果 1.tangibleT4EditorPlusModellingToolsVS2013.msi 2.devart T4 Editor for Visual ...
- Web开发人员不容错过的10个HTML5工具
HTML5已经成为当今世界的一个必定组成部分.由于World Wide Web万维网是使用超文本标记语言来架构和呈现的,于是HTML5成为了最流行的编程语言之中的一个.随着网络的不断扩张,Web开发者 ...
- Batch update returned unexpected row count from update [0];
Batch update returned unexpected row count from update [0]; actual row count: 0; expected: 1; nested ...
- STL源代码分析--第二级空间配置器
本文解说SGI STL空间配置器的第二级配置器. 相比第一级配置器,第二级配置器多了一些机制,避免小额区块造成内存的碎片.不不过碎片的问题,配置时的额外负担也是一个大问题.由于区块越小,额外负担所占的 ...
- HBase中Region, store, storefile和列簇的关系
转自:http://zhb-mccoy.iteye.com/blog/1543492 The HRegionServer opens the region and creates a correspo ...
- DDR电源硬件设计要点
一.DDR电源简介 1. 电源 DDR的电源可以分为三类: a.主电源VDD和VDDQ,主电源的要求是VDDQ=VDD,VDDQ是给IO buffer供电的电源,VDD是给但是一般的使用中都是把VDD ...