-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Protractor Testing Guidance #270
Comments
Currently the id attribute isn't passed. Honestly I haven't use protractor so I'm not sure if the id is all needed |
Using the outside container class ('type', but this could easily be an id)
|
var selectButton = element(by.name('fieldName'));
var selectInput = selectButton.element(by.css('.ui-select-search'));
// click to open select
selectButton.click();
// type some text
selectInput.sendKeys('Person name');
// select first element
element.all(by.css('.ui-select-choices-row-inner span')).first().click(); Tip: wrap into a page object to make things easier |
Did anyone have issues with protractor waiting for these elements to load? We have to add browser.sleep() in because it doesn't wait for these elements, which angular components protractor normally does by default. |
I'm having problems with Select2 and Protractor as well. Select2's behaviour with Protractor seems rather unpredictable when filtering and selecting elements. Sometimes elements will be selected, sometimes not. The only way to enforce consistent behaviour right now appears to be using browser.sleep(), which is a rather ugly hack and unnecessarily slows down tests. |
Any guidance on how to best test this directive with a Protractor end-to-end test? I tried to add an id attribute to the ui-select directive but it was replaced by the directive's replaced template.
The text was updated successfully, but these errors were encountered: