赞
踩
1
2
3
4
5
6
7
8
9
10
|
var html,
titleText;
// load the response body as HTML using cheerio
// and using cheerio's jQuery like .find API, get the H1 tag
html = cheerio(responseBody);
titleText = html.find('h1').text();
// add a test that ensures that there is some H1 content
tests["page must have h1 heading"] = Boolean(titleText);
|
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。