You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Actually when I need to wait that an element should be displayed I use the Expected Conditions for that, but I have a particular test where this commands is fails and I don't know why.
Bug report
Node Version: v.6.9.1
Protractor Version: v.5.1.2
Browser(s): chrome v60.0.3112.78
Operating System and Version MacOX Sierra
Cucumber Feature:
Given the user has not register before
And the user stay in the register section
When the user does sign up
And the user access to profile settings
And the user clicks on the Change Plan button
And the user select the "basic" plan
And the user click on the Subscribe button
Then the "credit card number" field should have a error // in this part fails
And the "date expires of credit card" field should have a error
And the "cvc number" field should have a error
Cucumber Step:
Then(/^the "([^"]*)" field should have a error$/, function(field, cb) {
var _text = null;
var _class = user.finds('.spec-cc-decline');
switch(field){
case 'credit card number':
_text = 'Your card number is incomplete.';
break;
case 'date expires of credit card':
_text = 'Your card expiration date is incomplete.';
break;
case 'cvc number':
_text = 'Your card security code is incomplete.';
break;
}
user.waitsFor(_class);
user.finds(_class).getText().then(function(text){
expect(text).to.be.equal(_text);
}).then(cb);
});
A relevant example test:
In my test I need to wait a red label to be shown then I apply this function, but is weir because in other tests the function is working great, only in this case fails:
this.waitFor = function(_class){
var timeout = 10000;
var _el = element.all(by.css(_class)).get(0);
return browser.wait(
EC.visibilityOf(_el),
timeout,
'Error: the element "' + _class + '" was not found.'
);
}
Output from running the test:
The UI modal:
The text was updated successfully, but these errors were encountered:
Please ask usage and debugging questions on StackOverflow (use the "protractor" tag) or in the Angular discussion group. (Please do not ask support questions here on Github.)
Hi there!
Actually when I need to wait that an element should be displayed I use the Expected Conditions for that, but I have a particular test where this commands is fails and I don't know why.
Bug report
v.6.9.1
v.5.1.2
chrome v60.0.3112.78
MacOX Sierra
In my test I need to wait a red label to be shown then I apply this function, but is weir because in other tests the function is working great, only in this case fails:
Output from running the test:
The UI modal:
The text was updated successfully, but these errors were encountered: