i tried this but the element i was trying to get is inside the . i cannot assert the visibility of the form or the input field. the error is it did not found the input element that is inside the form
Hi, sir! Is it okay that the 2nd approach works without using 'return' in custom method? Cypress.Commands.add('getIFrame', => { cy.get() .its('0.contentDocument.body') .should('be.visible') .then(cy.wrap) })
I am getting Below Error, Please give me a solution, Timed out retrying after 4000ms: cy.clear() failed because it requires a valid clearable element. The element cleared was: > ... A clearable element matches one of the following selectors: 'a[href]' 'area[href]' 'input' 'select' 'textarea' 'button' '' '[tabindex]' '[contenteditable]'
Timed out retrying after 4000ms: cy.clear() failed because it requires a valid clearable element. The element cleared was: > ... A clearable element matches one of the following selectors: 'a[href]' 'area[href]' 'input' 'select' 'textarea' 'button' '' '[tabindex]' '[contenteditable]'Learn more
//First approach it.only("Handling frames", () => { cy.visit(url); // Wait for the element to become visible cy.get('#mce_0_ifr').should('be.visible').then($ => { // Wait for 1 second to ensure the content has loaded cy.wait(1000); // Access the body element within the const body = $.contents().find('body'); // Ensure that the body is visible before proceeding cy.wrap(body).should('be.visible').then($body => { // Set contenteditable to true to allow editing $body.attr('contenteditable', 'true'); // Add a short wait after changing the attribute cy.wait(500); // Clear any existing text in the element within the and enter new text cy.wrap($body).find('p').clear().type("Hello World!!!"); // Select all text in the element cy.wrap($body).find('p').type('{selectall}'); // Click the 'Bold' button to apply bold formatting cy.get("button[title='Bold']").click(); }); }); });
You are one of the most selfless person I have seen in IT industry
My pleasure
This part was just perfect. The cypress- plugin is so useful. Thanks.
Welcome
You are the best. Learning is made easier by you..... Thank you
You are welcome!
Thank you Sir Pavan for the very helpful content!
Most welcome!
Excellent series. This is brilliant
Thanks
i tried this but the element i was trying to get is inside the . i cannot assert the visibility of the form or the input field. the error is it did not found the input element that is inside the form
Thanks Pavan Sir , For this Video
Welcome
Thank you Mr. Pavan
Welcome
Thank you very much! So easy to understand with you!
Welcome
Very good explanation! great :)
Thanks
Hi Sir
Your really a wonder in IT . Thank you you so much
Welcome
Hi, sir! Is it okay that the 2nd approach works without using 'return' in custom method?
Cypress.Commands.add('getIFrame', => {
cy.get()
.its('0.contentDocument.body')
.should('be.visible')
.then(cy.wrap)
})
Thanks Pavan for this video.
Welcome
Hi Can u please let me know why you have used its and inside why this value?
hello sir,which approach is best in real time for using ?
How to switch back to the parent document like deafultContent in selenium ?
How to handle that ifram which is open like a new page but not a new tab
Hii ,
Can we calculate the code coverage for applications using cypress?
Thanks
Sir i handle that frame which is present main page but problem is here. I click the element and it open a page but nat new' TAB' it is not hanling
Hi, did you get any solution for this? I am also getting same issue.
How can we switch the frame without id,Class?
Thank you!
You're welcome!
How can we access without id, Class or without any unique attribute/locator?
Did you find how to do it?
@@SanjeevYadav-so4jr yes, somehow I've managed
Hello Sir, Could you add cypress framework along with cucumber BDD please
I am getting uncaught exception while executing this test.
i got a error in the second approach
this website not working please provide any alternative
Hi Sir, Please share the github link , so that we can download the code
Hi sir can we have some tutorials about testcafe tool also?
Plz answer my previous question
this is too advance. what is the use of watching video.
I am getting Below Error, Please give me a solution,
Timed out retrying after 4000ms: cy.clear() failed because it requires a valid clearable element.
The element cleared was:
> ...
A clearable element matches one of the following selectors:
'a[href]'
'area[href]'
'input'
'select'
'textarea'
'button'
''
'[tabindex]'
'[contenteditable]'
Timed out retrying after 4000ms: cy.clear() failed because it requires a valid clearable element.
The element cleared was:
> ...
A clearable element matches one of the following selectors:
'a[href]'
'area[href]'
'input'
'select'
'textarea'
'button'
''
'[tabindex]'
'[contenteditable]'Learn more
I am also getting the same error... Any solution for this error? kindly guide me...
//First approach
it.only("Handling frames", () => {
cy.visit(url);
// Wait for the element to become visible
cy.get('#mce_0_ifr').should('be.visible').then($ => {
// Wait for 1 second to ensure the content has loaded
cy.wait(1000);
// Access the body element within the
const body = $.contents().find('body');
// Ensure that the body is visible before proceeding
cy.wrap(body).should('be.visible').then($body => {
// Set contenteditable to true to allow editing
$body.attr('contenteditable', 'true');
// Add a short wait after changing the attribute
cy.wait(500);
// Clear any existing text in the element within the and enter new text
cy.wrap($body).find('p').clear().type("Hello World!!!");
// Select all text in the element
cy.wrap($body).find('p').type('{selectall}');
// Click the 'Bold' button to apply bold formatting
cy.get("button[title='Bold']").click();
});
});
});
@@violetapetrovic3471 Thank you