F12調試頁面,如何定位參數

JQuery元素定位

1.輸入"$",查看頁面是否支持JQuery元素定位,若是不支持,則使用documen.querySelecttor('Input');html

2.使用$('#username').length 查看元素username的個數;post

3d

3.使用$('input[name=lt]').val()獲取到It值htm

 

4.在postman使用html界面定位到元素:blog

如:input

const $ = cheerio.load(responseBody); //調用cheerio方法,獲取到responseBodyio

console.log($('input[name=lt]').val());console

pm.globals.set("lt", $('input[name=lt]').val());postman

5.cheerio方法的使用,參考:https://cheerio.js.org/這個庫方法

相關文章
相關標籤/搜索