Drop Down handle in Cypress - Part 11
Vložit
- čas přidán 21. 08. 2024
- In this video, I have explained how to select value from dropdown.
- How to select value from Select tag based drop down
- How to select value from non select tag drop down
- Google Search use case
- EComm application Search case
~~~Subscribe to this channel, and press bell icon to get some interesting videos on Selenium and Automation:
www.youtube.co...
Follow me on my Facebook Page:
/ naveenqtpexpert
Let's join our Automation community for some amazing knowledge sharing and group discussion on Telegram:
t.me/joinchat/...
Paid courses (Recorded) videos:
naveenautomati...
For Java & Selenium - naveenautomatio...
For API (Manual + Automation) - naveenautomatio... - Věda a technologie
Thanks for explaining how we select value from drop down with or without Select class.
fabolous explanation
Short , Precise and to the point. Thanks again Naveen.
Naveen, are you planning to show the use of each() as well in your Cypress series?
Not specific to these video, but sharing the below point, which I find useful to get any attribute or innerText for running any validation or performing any activity.
Example:
cy.get('.search-box-text').invoke('attr','id').should('contain','searchterms')
cy.get('.search-box-button').invoke('attr','value').should('equal','Search')
cy.get("a[href*='register']").invoke('text').should('equal','Register')
Thanks @Naveen AutomationLabs. We could gain much knowledge on Cypress and related topics. Could you please make more videos on Cypress API and also on Framework part
Hi Naveen,
Video is great. am eagerly expecting a video like how to perform login on multi-domain environment in Cypress!
Thanks Naveen ! , File Upload methods / ways ? waiting for that series
obrigado amigo me ajudou muito
Can you Please upload more videos on cypress?
Hi please uploaded videos on manual testing
Hi Naveen, Is there any way to select dropdown list using indexing in Cypress, in my case dropdown values are not always same so can't use same text again?
How can we select some value from a dropdown that is not in select tag or any tag, it is just displayed as a list and the list is fetched from server and only a span tag stores the selected value, kindly help me out with this. html sample is attached
Select
select
jQuery(function(){jQuery("#EntityType").kendoDropDownList({"change":entityTypeChanged,"dataBound":entityTypeDataBound,"dataSource":{"transport":{"prefix":"","read":{"url":"/XYZ/ABC/System/GetEntityTypes?pageMode=1","type":"POST"}},"schema":{"errors":"Errors"}},"dataTextField":"Text","dataValueField":"Value","optionLabel":"Select"});});
Hello Naveen sir While trying google example I am getting below error
Timed out retrying: cy.click() failed because this element is detached from the DOM.
...
Cypress requires elements be attached in the DOM to interact with them.
The previous command that ran was:
> cy.contains()
This DOM element likely became detached somewhere between the previous and current command.
Common situations why this happens:
- Your JS framework re-rendered asynchronously
- Your app code reacted to an event firing and removed the element
You typically need to re-query for the element or add 'guards' which delay Cypress from running new commands.Learn more
cypress/integration/myTest/dropdown_test.js:30:60
28 | //.contains('cypress tree').click()
29 |
> 30 | cy.get('.erkvQe li span').contains('cypress tree').click()
|
Would please help me on this?
sometimes it's working for me and sometimes not
@@brillmindz5853 cy.get("[name='q']").type('cypress').blur()
cy.get('.UUbT9')
.find('li span')
.contains('Cypress Hill',{timeout:5000})
.click()
use .blur() method, it will solve your issue
How much knowledge of spring boot and micro services,required for automation Tester ,please make video on it
Please replay anyone from the naveen automation labs family @naveen
Naveen thanks for this explanation... you are really helpful. I have some questions regarding load testing... do you have any personal email id where I can ask this?
sometimes for google search scenario, 'cypress tutorial' is being clicked and sometimes not.
How to check negative test cases in cypress for dropdown
when i count the list items, its print the "0". But it shows cross eye symbol (One or more matched elements are not visible) with count value. How to solve this
cy.get('li[role="option"]').should('have.length.greaterThan', 0)
.its(length) - cross eye with count
.then(cy.log) // It prints 0 value