我正在尝试使用 webdriverio 框架访问嵌套的 webelement。
我有以下代码
function selectSales(sfilters, salesflowName) {
const sflow = $$("app-filters-manager app-salesflow-panel mat-expansion-panel").find(element => {
return element.getText() === salesflowName;
});
/* The below is to select the checkbox from a list of checkboxes under
the parent */
sfilters.forEach(fil => {
sflow.$$("mat-list-option").find(el => { //* > This is where I am getting error.
return el.getText().includes(fil);
}).$('mat-pseudo-checkbox').click();
});
}
我正进入(状态Cannot read property '$$' of undefined
不知道为什么会出现错误。'sflow'是父 web 元素,使用访问子元素$$("mat-list-option")是出现错误的地方。
人到中年有点甜
白衣染霜花
慕田峪9158850
随时随地看视频慕课网APP
相关分类