When you are trying to setup your testing too, there is a chance that you will be stuck on some error and it will consume some of your valuable time.
While working with protractor, there is aoo% chance that you will stumble upon this error which the most common error with this tool.
There are multiple ways to try that can fix this issue.
browser.wait(EC.visibilityOf($(‘username’)));
Use then to resolve and wait for subsequent step:
this.loginBtn.click().then(function(){
expect(element(by.xpath(‘//*[@id=”bAdd”]’)).getText()).toEqual(‘Create’);
})
In jasmine, async call is triggered and time out happens. To solve it, give enough time in it block for example 12000ms in blow code
it (‘some thing’, function(){ }, 120000)