I want to select an item from the drop down list using nightwatch. i am able to get the item till my if condition. it also prints the value. but when i click on the item using elementIdClick
, it returns {"status":-1,"state":"","value":{"message":"element click intercepted:
await browser.elements('css selector','#profile-container .col-md-6 .pd-dropdown-wrapper ul li', async function (res) {
await res.value.forEach(async function (jsonWebElement) {
let jsonWebElementId = jsonWebElement.ELEMENT;
await browser.elementIdText(jsonWebElementId, async function (jsonElement) {
let text = jsonElement.value;
console.log('text++++',text)
if(text == 'Last 30 Days'){
console.log('text^^^^^',text)
await browser.elementIdClick(jsonWebElement.ELEMENT);
}
});
});
});