2
我有我想要驗證的頁面元素的列表正在屏幕上顯示。返回項目名稱不是對象對象
我想輸出到控制檯的元素名稱,我正在尋找但是當我這樣做時,我只是得到object Object
。
var detailElements = [disabledRuleWarning, detailsLabel, detailsHide,
nameLabel, nameField, ruleActive, groupLabel, threatTypeLabel,
threatTypeDropdown, descLabel, descField, tagsLabel, tagsField,
severityLabel, actionsLabel, addAction];
it(TestSuiteName + 'TC5_Verify Details Elements are displayed', function(){
console.log('TC5 Verify Details Elements are displayed');
DetectionRules.newRuleButton.click();
browser.waitForAngular();
detailElements.forEach((item) => {
console.log('Checking for item: ' + item);
expect(item.isDisplayed()).toBe(true);
});
DetectionRules.deleteRule.click();
});
謝謝@alecxe一旦我的環境恢復正常,我會盡快完成這一步。 – DarthOpto
非常感謝。這工作很好。 – DarthOpto