1.打开输入网址chrome://inspect
2.连接移动设备,打开usb调试
3.选择对应的界面进行调试
4.通过xpath获取webView中对应的数据
xpath规则eg://div[@class='xxx']/p[2]/text() (获取img的sc:img/@src")
p[2]:表示同级下的第二个p标签,last()表示最后一个
5.测试xpath
打开对应的网页,在console中输入$x("xpath")来验证xpath的正确性
1.打开输入网址chrome://inspect
2.连接移动设备,打开usb调试
3.选择对应的界面进行调试
4.通过xpath获取webView中对应的数据
xpath规则eg://div[@class='xxx']/p[2]/text() (获取img的sc:img/@src")
p[2]:表示同级下的第二个p标签,last()表示最后一个
5.测试xpath
打开对应的网页,在console中输入$x("xpath")来验证xpath的正确性