Skip to content
Discussion options

You must be logged in to vote

I've solved my issue with this code:

Cypress.Commands.add('login', (pass) => {
  cy.visit('/w/index.php?title=Specjalna:Zaloguj');
  cy.get('#wpName1').type('Ciemny vector test');
  cy.get('#wpPassword1').type(pass);
  // Wikipedia sometimes redirects without submiting a form
  cy.url().then(url => {
    if (url.match(/Zaloguj/)) {
      cy.get('#userloginForm form').submit();
    }
  });
});

I have no idea why Wikipedia is redirecting without submit but this solved the issue.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by jcubic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
1 participant