Reputation: 31
The dropdown block is working fine because, I can see that the element is clicked and the drop down appears with check box type options populated, however after the selection it does not close. I have also attached the HTML snippet of code after the dropdown block is opened below -
The below is the UI screen.
The below is the HTML snippet to the Prefix field:
This is the code i am trying with:
element(by.model("requestType.whoCanInitiate")).click();
element.all(by.repeater("user in usersList")).get(3).click();
element(by.model("requestType.icon")).click();
element.all(by.repeater("icon in icons")).get(0).click();
element(by.name("prefix")).sendKeys("admin");
Upvotes: 0
Views: 849
Reputation: 1909
I believe that dropdown can be closed by clicking somewhere outside or pressing ESC button, try the following examples
$('body').sendKeys(protractor.Key.ESCAPE);
or
$('body').click();
or close by clicking on material backdrop element
$('md-backdrop').click();
Upvotes: 4