-
Notifications
You must be signed in to change notification settings - Fork 13.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
beta-13 regression - can't sendKeys to ion-inputs from protractor e2e test #15956
Comments
per Mike's recommendation in slack, I will update with a dead-simple test case based on a starter template by tomorrow. ...unless, of course, you guys beat me to it and something obvi jumps out at ya ;). |
Updated description above with link to branch diff against ionic starter that shows the code that works on beta.12 but fails on beta.13 |
I have a similar problem but when running unit tests. Ionic Info
Component
Component Template
Unit Test
Test Result● EditNamePage › should update the form control on input a name
It was working before with |
yup this problem still exists with beta 16 |
Seems that this is due to Protractor needing the underlying input located within the shadow DOM. The only workaround I found is to add a custom locator:
|
Issue still exists in 4.0.0-rc.0. The workaround works well. |
I close this for now because it should fixed with #17043 . After rc.2 release you can check again and if it still not working, just create a comment here and I reopen. The reason because it should work then is because ion-input not use shadow dom anymore, so the input field is now available in normal dom, no shadowroot is needed anymore |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Bug Report
Ionic Info
Run
ionic info
from a terminal/cmd prompt and paste the output below.Describe the Bug
sendKeys to element(by.css('ion-input[formControlName="username"]')) doesn't seem to work on beta.13, but it works on beta.12 ...
Steps to Reproduce
Repository here showing the problem clearly:
https://github.com/captaincaius/loadingtestcase/pull/2/files
Steps to reproduce the behavior:
"Failed: unknown error: cannot focus element"
I also tried to use deepCss on the input inside it, but that didn't work either ... i'm trying to figure out if I need to do something differently or if it's a bug to file.
Expected Behavior
protractor is able to sendKeys to the input.
Additional Context
I guess the first question here is... with all this shadow dom stuff, are we supposed to be targeting the ion-input like above, or the input inside it? I was never able to get deepCss to work even in previous betas. But targeting the ion-input like above DOES work in beta.12.
If I'm using the wrong selector above, lmk.
The text was updated successfully, but these errors were encountered: