考虑以下代码片段
var allRows = element.all(by.repeater('row in items'))
这将返回一个array
转发器项目。那么,如何在控制台中调试此变量。当我这样做时console.log(allRows)
,我在控制台而不是数组中得到以下内容html
。
{ ptor_: { controlFlow: [Function],
schedule: [Function],
setFileDetector: [Function],
getSession: [Function],
getCapabilities: [Function],
quit: [Function],
actions: [Function],
touchActions: [Function],
executeScript: [Function],
executeAsyncScript: [Function],
call: [Function],
wait: [Function],
sleep: [Function],
getWindowHandle: [Function],
getAllWindowHandles: [Function],
getPageSource: [Function],
close: [Function],
getCurrentUrl: [Function],
getTitle: [Function],
findElementInternal_: [Function],
findElementsInternal_: [Function],
takeScreenshot: [Function],
manage: [Function],
switchTo: [Function],
driver:
WebDriver {
session_: [Object],
executor_: [Object],
flow_: [Object],
fileDetector_: null },
element: { [Function] all: [Function] },
'$': [Function],
'$$': [Function],
baseUrl: '',
rootEl: 'html',
ignoreSynchronization: false,
getPageTimeout: 100000,
params: {},
ready:
Promise {
flow_: [Object],
stack_: null,
parent_: null,
callbacks_: null,
state_: 'fulfilled',
handled_: true,
value_: null,
queue_: null },
plugins_:
{ pluginConfs: [],
pluginObjs: [],
assertions: {},
resultsReported: false },
resetUrl: 'data:text/html,<html></html>',
trackOutstandingTimeouts_: true,
mockModules_: [ [Object] ],
allScriptsTimeout: 100000,
getProcessedConfig: [Function],
forkNewDriverInstance: [Function],
restart: [Function] },
那么如何调试应该包含所有 html 行的实际变量。我在调试文档中找不到它的选项。
任何帮助是极大的赞赏。
谢谢。
更新
allRows
有以下标记。
<li>AA</li><li>BB</li><li>CC</li>
我需要在控制台中查看整个内容