First of all thanks for the good work that you are doing sir. You are making the concepts of testing easy for anyone to understand. Also Sir I have one small query on clearing the errors related to CORS error while loading the page. I have gone through lot of documentation but nothing helped except introducing an exception concept. Can you explain why this error will come and how to clear this error
Great job, for the Javascript prompt alert where cancel is clicked, the controller should return ''null" instead of welcome cy.window().then((win) => { cy.stub(win, 'prompt').returns('null')
Dear Edwin, I think if you pass the return value "null" to the prompt, it should always show as null. It will not reflect 100% that Cypress actually clicked the cancel button or not. It is somehow equal to: You entered a value "null" in the text field and click OK. Instead, I think this would be a better option: cy.window().then((win) => { cy.stub(win, 'prompt').callsFake(() => null) })
@@ujanshakya1862 can you please share some code snippet of that part? I tried with cy.window().then((win) => { cy.stub(win, 'prompt').returns('something').callsFake(() => { return false }) }) it does not work. any ideas?
@@ujanshakya1862 it is also not working for me cy.visit("the-internet.herokuapp.com/javascript_alerts") cy.get("button[onclick='jsPrompt()']").click() //cancel prompt not working cy.stub(window, 'prompt').callsFake(() => null) cy.get('#result').should('have.text','You entered: null')
Hello Sir, I am interested in learning JavaScript course for automation purpose not for development. i am learning Cypress from your videos but i am not good at JavaScript. kindly share me link please
Providing such a high quality trainings for free is unbelievable) Hope you are living your best life for such kindness! THANK YOU!
You're so welcome!
You made Cypress very understandable. You are the best.
Thanks
Great explanation. Making cypress easy to understand. Waiting for the next video on cypress. Thank u sir for providing such a great content.
Keep watching
Really appreciate the way you explain each concept! Thank you so much!
You're very welcome
Great job, thank you for the content 😉
My pleasure!
Thanks for this great video.
My pleasure!
sir u r teaching is too good ..
Thanks
Very helpful video. Thank you!
Most welcome
First of all thanks for the good work that you are doing sir. You are making the concepts of testing easy for anyone to understand. Also Sir I have one small query on clearing the errors related to CORS error while loading the page. I have gone through lot of documentation but nothing helped except introducing an exception concept. Can you explain why this error will come and how to clear this error
Great job, for the Javascript prompt alert where cancel is clicked, the controller should return ''null" instead of welcome
cy.window().then((win) => {
cy.stub(win, 'prompt').returns('null')
Dear Edwin, I think if you pass the return value "null" to the prompt, it should always show as null. It will not reflect 100% that Cypress actually clicked the cancel button or not. It is somehow equal to: You entered a value "null" in the text field and click OK.
Instead, I think this would be a better option:
cy.window().then((win) => {
cy.stub(win, 'prompt').callsFake(() => null)
})
@@couplescoast2823 thanks brother
Your explain very well sir you did a great job like freely provide videos. Why we can write like success mesg validate same as alert window? 🤔
Great video! Thank you!
You are welcome!
how do you solve document not focused error?
first thanks for this amazing series sir , somehow sir 33:58 you left cancel of prompt along with ok
hi sir, for number 3 - Javascript Prompt Alert
how do we click "Cancel" button after entering the text?
we can use the Cypress callsFake method and then return null which tells cypress we want to cancel prompt.
@@ujanshakya1862 can you please share some code snippet of that part?
I tried with
cy.window().then((win) => {
cy.stub(win, 'prompt').returns('something').callsFake(() => {
return false
})
})
it does not work. any ideas?
@@ujanshakya1862 it is also not working for me cy.visit("the-internet.herokuapp.com/javascript_alerts")
cy.get("button[onclick='jsPrompt()']").click()
//cancel prompt not working
cy.stub(window, 'prompt').callsFake(() => null)
cy.get('#result').should('have.text','You entered: null')
Hello sir can u provide the document of manual testing test cases sheets.
Sir can u provide the manual testing test cases link
www.pavantestingtools.com/p/manual-testing-project.html
can anybody tell ,how to get selector hub? which key have to use?
search in extension and add it
You made an error in the #3 step which null with cancel button case, it should be discussed but you just skipped!
can you provide the testing source code which you are doing.
Hello Sir, I am interested in learning JavaScript course for automation purpose not for development. i am learning Cypress from your videos but i am not good at JavaScript. kindly share me link please
please give here your git repo link
Hi sir, can we get the gitHub repo link for the code of this tutorial
// JS prompt text validation code
cy.window().then((win) => {
expect(win.prompt.args[0][0]).to.include('I am a JS prompt');
});
what is this code all about ?