I tried verifying xpath in console i.e
$x("//input[contains(@data-bind,'selectedParentKpi')]")[0].value
o/p :- "12M Rolling MTBF (Days)"
So I am getting value in console. I am trying get data from my protractor test script as below
element(by.xpath("//input[contains(@data-bind,'selectedParentKpi')]")).getAttribute('value').then(function (text){
console.log(text);
cb();
})
IN test script I am getting null. Can anyone suggest what is the equavalent of $x("//input[contains(@data-bind,'selectedParentKpi')]")[0].value in protractor script