原理: app通过上传当前屏幕截图以及截图相关的所有元素至后台,前端通过上传的数据进行可视化展示,以及可视化绑定。 例子:
元素id,用于前端布局。
布局定位元素位置和大小 这里使用相对父view的布局方式。 !!#ff0000 列表坐标!!需要通过contentOffset特殊转换。因为这里的坐标都是绝对与父view的坐标,然而列表是可以滑动的。
子元素id数组[sub_elementMd5, ... ]
元素唯一标识 xpath的md5 平时业务埋点,就会改动到这个xpath,比如设置瀑布流、区分共用元素xpath、稳固xpath、自定义xpath等等。
元素能否曝光
##平时埋点,我们其实就是在处理这两个字段:spmXpathMd5、exposureEnable
// 业务埋点-本质改动的字段:
1. spmXpathMd5 - 修改xpath,比如设置瀑布流、区分共用元素xpath、稳固xpath、自定义xpath等等。
2. exposureEnable - 标记元素曝光。