Automating Reddit website using Cypress #24351
-
Has anyone tried to automate www.reddit.com using cypress 10 as part of any test project? When I tried to invoke the above url using cy.visit, for some reason the Test Runner window closes on its own not showing what happened to my tests. But when I change the resolution to that of a mobile device, it works just fine and I can see my test passes. www.reddit.com/login also loads fine, however after entering username/password and clicking login, the homepage does not load after login as it does when manually done. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I’m thinking you are trying to use Cypress as a general-purpose automation tool and not a testing tool. Big sites like gmail, reddit, facebook have different security measures in place that keep them from being opened in iframe (as Cypress does). This means that reddit probably kicks you out of its page the minute you try to access it via iframe. Cypress is a testing tool, which means that it is built for testing an application you are somehow involved with, either as a developer or a tester. It will not work for scraping the web or performing automation scripts on a third party site as this is not something it was built for. |
Beta Was this translation helpful? Give feedback.
I’m thinking you are trying to use Cypress as a general-purpose automation tool and not a testing tool. Big sites like gmail, reddit, facebook have different security measures in place that keep them from being opened in iframe (as Cypress does). This means that reddit probably kicks you out of its page the minute you try to access it via iframe.
Cypress is a testing tool, which means that it is built for testing an application you are somehow involved with, either as a developer or a tester. It will not work for scraping the web or performing automation scripts on a third party site as this is not something it was built for.
more explanation in this doc FAQ