Unable to visit a site using Cypress. Getting access denied.
See original GitHub issueCurrent behavior
I am trying to visit a website using cypress to test file upload. When I use Cypress it shows access denied. But when I tried using Selenium it worked fine.
Code to reproduce
describe('Test upload file with cypress',function(){
beforeEach(function(){
cy.visit('https://easyupload.io',{failOnStatusCode: false});
})
it('upload pdf file',() =>{
cy.get('form#dropzone').attachFile(
{
filePath: 'example.json',
mimeType: 'document/json',
encoding: 'binary'
},
{
subjectType: 'drag-n-drop',
force: true,
})
cy.wait(2000);
});
})
Cypress Version
7.7.0
Screenshot
Issue Analytics
- State:
- Created 2 years ago
- Comments:7 (1 by maintainers)
Top Results From Across the Web
Web Security - Cypress Documentation
Because of the way Cypress is designed, if you are testing an HTTPS site, Cypress will error anytime you attempt to navigate back...
Read more >Cypress can't access a website from its automated browser ...
I have a script with Cypress.io that basically access a website and clicks on a link for LOGIN. I have reduced the code...
Read more >Controlling Browser Permissions in Cypress End-to-End Tests
It helps control the permission level of various browser features such as: Desktop Notifications; Geolocation; Images; Camera; Microphone; etc.
Read more >cypress-io/cypress - Gitter
While running the test in AzureDevOps CI/CD I am getting an error..."Failed to read the 'localStorage' property from 'Window': Access is denied for...
Read more >Give Chrome Browser Clipboard Permissions from Cypress Test
Using " Cypress.automation" command and Chrome Debugger Protocol we can access the clipboard text from the Cypress test to verify the ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
any news on this case?
Cloudflare is blocking the request. You should look at the network traffic and see what headers Selenium sends and then compare that with Cypress.