everyone!
So I have this intern code:
'Home page navigation bar: first load': function() {
return util.createPage(this, '/')
.then(function(){console.log('masuk');});
}
I want to debug like that, but instead of printing masuk
, I want to print all of the HTML source code of the page I made. How can I do that?
Thanks.
Assuming createPage
is returning a Command chain, you could do:
util.createPage(this, '/')
.getPageSource()
.then(function (source) {
console.log(source);
});
The getPageSource method requests the HTML from the currently focused browser window or frame.
最好的办法是将HTML放入var中并打印出来,然后用console.log管理HTML var。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.