0

I want to do the validation using protractor for bootstrap pop up. I used the below code it ran successfully three times but now its getting null. Var content = element.all(by.css(.'username')); Console.log(content):;

For your reference relates to below:

https://stackoverflow.com/questions/51674254/protractor-bootstrap-validation-pop-message#=

  • 1
    Have you checked quoting the parameter `var content = element.all(by.css('.username')); ` ? – F.Igor Aug 08 '18 at 02:54
  • Yeah it's not the problem .how do I locate it https://stackoverflow.com/questions/51674254/protractor-bootstrap-validation-pop-message#_=_ – Abhishek Dalakoti Aug 08 '18 at 02:56
  • It looks like you need to wait for it to be present, then start interrogating it. Have you tried waiting with expected conditions? – Jeremy Kahan Aug 08 '18 at 03:03
  • Yes I have tried wait but how to locate the pop up element as it's coming from bootstrap library – Abhishek Dalakoti Aug 08 '18 at 03:04
  • oh, perhaps you need to wait for the window handle count to be a certain number (one more than before) and then switch to the popup (using its title to find the right window, say; or noting the handle of the current window before popup, then choosing the one that is not that) and then work on it. waitForWindowCount at https://github.com/hetznercloud/protractor-test-helper may be helpful with that. – Jeremy Kahan Aug 08 '18 at 03:25
  • Even this library can't help in html5 pop up validation as it's very difficult to get text from pop up as it's not diaplayed in HTML when we do inspect. – Abhishek Dalakoti Aug 08 '18 at 03:36
  • ok, I'm out of ideas, sorry. except maybe https://github.com/angular/protractor/issues/1554 – Jeremy Kahan Aug 08 '18 at 03:38
  • This is the similar issue but no solution for it.https://github.com/angular/protractor/issues/1209 – Abhishek Dalakoti Aug 08 '18 at 03:48

0 Answers0