Thanks for the video! that was very useful. comment and question if i may. question: once configured the if statement, how can i proceed to do assertion for example, or go back? (i know how to just not sure where the command should be placed). comment: you dont really need to third argument in the each() method. this will work as well. cy.get('.inventory_item_name') .should('contain.text', 'Sauce Labs') .each(function ($el, index) { if (index == 2) { $el.click() } overall very good video!
@@CopeAutomation I'll try to rephrase. Once added if statement and clicked on the matching element but now I want to go back to the main page, correct me if I'm wrong, I need to start new cy.get and not perform it in the if statement. Correct?
Thanks! That's what I thought. Any chance making video about cypress reports with mochawesome or mocha - allure? If so, that will be VERY much appreciated.
It was such a nice video, but I have a question, how can I select the first 50 elements we have some 250 matching element. I need to have all those first 50 elements to be stored in an array
First time I understand each with multiple conditions. THANKS
Finally i understand how to handle multiple elements
By far the best video. All the examples taken here are practical! Keep up the good work!
Thank You. It was helpful to a newbie like me to cypress.
Glad to see you back on TH-cam
Thank you :)
Thank you!!! It was very clear and detailed. I was looking exactly for this solution. :)
A M A Z I N G !
Thanks much🙏
Brilliant
please create a framework video (page object mode pattern)
Thanks for the video! that was very useful.
comment and question if i may.
question: once configured the if statement, how can i proceed to do assertion for example, or go back? (i know how to just not sure where the command should be placed).
comment: you dont really need to third argument in the each() method. this will work as well.
cy.get('.inventory_item_name')
.should('contain.text', 'Sauce Labs')
.each(function ($el, index) {
if (index == 2) {
$el.click()
}
overall very good video!
Hi
Thanks. I get your comments part but not the question. You may need to elloborate a bit
@@CopeAutomation I'll try to rephrase.
Once added if statement and clicked on the matching element but now I want to go back to the main page, correct me if I'm wrong, I need to start new cy.get and not perform it in the if statement. Correct?
That's right. Also depends on the click event on where it leads to. So according you can proceed to next step or if you need to go back use cy. get
Thanks! That's what I thought.
Any chance making video about cypress reports with mochawesome or mocha - allure? If so, that will be VERY much appreciated.
It was such a nice video, but I have a question, how can I select the first 50 elements we have some 250 matching element. I need to have all those first 50 elements to be stored in an array
Hey
Thanks. Loop through the array using standard for loop and select the index from 0-49. That's what you are after?
@@CopeAutomation yeah i tried the same way but was getting error, if you don't mind could you please send a sample code for same?
Nice video, very useful .Can we have your mail-id for some clarification regarding cypress
Can you please leave the previous code as is. Don’t overwrite