Skip to content
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

Not able to type text using index, incase if application does not have any id's or name attribute #4350

Closed
mohammedroni4 opened this issue May 30, 2019 · 3 comments

Comments

@mohammedroni4
Copy link

mohammedroni4 commented May 30, 2019

I'm not able to type text in search textfield using the index, and I do not have name or id attribute, so I click on the dropdown and I have many options, and if I'm willing to click one, I'm not able to click on the elements because those hidden.

And I have another option where I can type text there, but for that I do not have id's or name attribute so I thought of using index as . cy.get('example').eq(0).type('Hello');

It seems like it says its not a valid attribute so if its not valid attribute its not letting my type.

I guess it would be big help if you guys can fix this issue..

@jennifer-shehane
Copy link
Member

Please provide an example of the html you are trying to type into. Please also provide a screenshot or the actual text of the error you are seeing.

Unfortunately we'll have to close this issue if more information is not provided. We need a way to reproduce the bug completely.

@jennifer-shehane jennifer-shehane added the stage: needs information Not enough info to reproduce the issue label May 31, 2019
@mohammedroni4
Copy link
Author

mohammedroni4 commented May 31, 2019

Hey, so i'm attaching snapshot as you can see in the picture, that my dropdown category is open and also in the console log. So I want to be able to type text instead of selecting an option, since there is no select option.

So as you can see there are two class which I can use to type text, so whenever I try to find element, it always finds two elements which I dont want, so I want it to type text using index so it can only type text in the first input field. so I wrote the code like this: cy.get('example').eq(0).type('Hello'); so I thought it would do is, grab the first input and type there but its not happening. let me know if its make sense to you.

Screen Shot 2019-05-31 at 9 59 08 AM

Screen Shot 2019-05-31 at 10 20 15 AM

@jennifer-shehane
Copy link
Member

The element you're typing into is not considered a typeable element as the error indicates - it lists all elements we consider typeable.

We plan to expand some of these rules here: #3661

As for help for querying within Cypress, We recommend questions relating to how to use Cypress be asked in our community chat.

Issues in our GitHub repo are reserved for potential bugs or feature requests. This issue will be closed since it appears to be neither a bug nor a feature request.

@jennifer-shehane jennifer-shehane removed the stage: needs information Not enough info to reproduce the issue label Jul 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants