Cypress Form Submit Download file issue test failed - form-submit

Cypress test case failed on button click.Please give me proper solution.

I would suggest to check first if this button visible or not so
cy.get('button').should('be.visible')
if this action passed you can do click
cy.get('button').click();
and if you give us more details (error message, selector, screenshot ... ) would be awesome

Related

Cypress When I click on Edit button, I no longer have access to cypress command

My test case have cy.click() in many places. I have no issue to continue and use cy.wait(300) or another other cypress functionality. However when I get to specific page, I no longer have access to any of the cy commands. I am not sure why this is happening. I have used many cypress commands. I have used cy.click many times. they all work. This is the only place that when I click on the edit or even if I just hardcode cy.visit(editUrl). I have no access to cy commands anymore.
cy.get('a[title="Locations"]').click();
cy.wait(2000);
everything is normal till I get to here
so I click on Edit button
cy.get('.as-modal-disabled').contains('Edit').click() .. it finds Edit
but now if i use any cy function it will blow up
cy.wait(3000); this could be cy.visit() .. any cy
I also tried this
cy.wait(6000);
cy.get('.as-modal-disabled').contains('Edit', {timeout: 15000}).click()
again same issue anythign with cy after it blows up .
none of these commands works
cy.get('#location_address_attributes_address1').click().clear()
cy.get('#location_address_attributes_address1').type(randomAddress);
I just get a red error
I am also currently have issues with this, the problem is edit elements are not available on the Dom in cypress chrome.
reproduction steps
run automation with cypress using any of the simple data, in my case
I was using the shipping data on the shipping data page try clicking
on the edit button. test will fail because it can not find locator.
on a regular browser the locators are present but on cypress browser
they can not be accessed.
#metawaa force click will not work because the elements are not on cypress chrome

CanĀ“t open an internal page in Cypress Chrome

We have an cypress issue that is similar to the issue described in "https://github.com/cypress-io/cypress/issues/850". The reason for why I am creating a new post is that I have done some changes in the environment which makes this work but only after the first fail and then manually click on the failing URL.
Test1:
Default cypress\plugins\index.js file (no changes)
lauch the internal page cy.visit('xxx')
Error 401.
Click on the link below the error text. Another tab is opened and message UNAUTHORIZED is shown.
Paste same URL in default Chrome->works fine.
Test2:
Modify the cypress\plugins\index.js: args.push('--proxy-pac-url=xxx') (I have tested other arguments but this is the only one that makes something different)
Lauch the internal page cy.visit('xxx')
Error 403.
Click on the link below the error text. Another tab is opened and the page is shown CORRECTLY.
This is the reason why I post this new message. I want to ask if there is a way to get Cypress to open the page automatically via cy.visit() in the same way as when I click on the failing URL and it opens the page in the same cypress browser but just another tab?

How to handle expected alert in nightwatch-cucumber

In my nightwatch.conf.js I have mentioned the "unexpectedAlertBehaviour":"accept".
But I have a scenario where I have to check the alert flow too, like so
When I refresh the page
Then I dismiss the alert
But when I try to execute the code, the alert is accepted by default and the test fails. I verified this by removing the "unexpectedAlertBehaviour":"accept", and the scenario works correctly. Is there any way to programmatically set the unexpectedAlertBehaviour value or set the alert as expected? I need the option "unexpectedAlertBehaviour":"accept" since there are other flows that run based on this

CKEditor Error on Image Upload

I receive the following message when I select an image to upload and then click "send it to the Server":
Unable to get property 'setCustomData' of undefined or null reference.
I searched for CKEditor setcustomdata but came up with nothing...
Making an assumption that you are using the CKSource Image plugin. I received this error when I used the advice from this post about setting the default open tab to the Upload tab. I moved the this.selectPage('Upload'); into the onLoad event and no longer receive the error but it doesn't default the selected tab to upload on subsequent show events.
I hope this helps or at least gives you a direction to look.

How come the close button link doesn't work for the telerik:RadNotification control on DotNetNuke?

I'm using the telerik:RadNotification control, with VisibleTitlebar="true" ShowTitleMenu="false" and ShowCloseButton="true".
When I hover over the little X (close button) the URL is "http://localhost/mySite/href". When I click on it it takes me to an HTTP Error 404.0 - Not Found page.
Any advice would be greatly appreciated. Is there any way to programmaticly fix the bad link?
I tried adding an OnClientHiding="OnClientHiding" and adding an javascript alert in the OnClientHiding method but it goes to the error page first.
My problem was that I was not getting into the OnClientHiding event handler. It looks like some code in the OnClientShown event handler was causing this issue.

Resources