When I run the code below I get the error Protractor : Failed: Object has no method 'getText'
, and it was working with the older version of protractor 1.8. Everything was working fine and when I upgraded to latest version 2.1.0
it('Create Matter', function() {
PlanPage.get().then(function() {
PlanPage.ProjectsDashlet.createProject('Project workflow with external payments', 'DEBT_RECOVERY').then(function() {
PlanPage.ProjectPlannerDashlet.MatterDetailsDashlet.MatterDetailsTitle('A PVT Test','PVT Test Description');
browser.sleep(5000);
PlanPage.ProjectPlannerDashlet.matterTitle().getText().then(function(ele) {
expect(ele.getText()).toBe('A PVT Test');
});
});
});
},60000);
});
function matterTitle(){
var ele = $('#dtMatterDetails-title');
console.log(ele);
Elements.waitForElementToBePresent(ele);
return ele;
}
I had to do this