Answer the question
In order to leave comments, you need to log in
How to test url on e2e in cypress for specific browser?
Good afternoon.
The site checks that if a user logs in with ios and uses the Firefox browser, then you need to redirect him to a specific URL.
Question: how to test this functionality on e2e using cypress? Can tests change the browser during launch?
Answer the question
In order to leave comments, you need to log in
It seems like cypress should support passing the user agent in the header for cy.visit
it('Проверка редиректа', () => {
cy.visit(portalURL + '/page/', {
headers: {
'user-agent': 'Mozilla/5.0 (<system-information>) <platform> (<platform-details>) <extensions>',
}
});
});
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question