Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Request: Ability to "visit" with a post #1500

Tarig0 opened this issue Mar 26, 2018 · 6 comments

Feature Request: Ability to "visit" with a post #1500

Tarig0 opened this issue Mar 26, 2018 · 6 comments


Copy link

@Tarig0 Tarig0 commented Mar 26, 2018

  • Operating System: Win 10
  • Cypress Version: 2.1
  • Browser Version: ELectron

Is this a Feature or Bug?


Current behavior:

Request allows me to post information but not have the browser run Javascript
Visit allows me to issue, only, get requests and then runs the javascript

Desired behavior:

Have the ability to have a visit esc command or an option to send post data that will resolve to a window that will then run JS to validate elements that are added by the JS

Copy link

@jennifer-shehane jennifer-shehane commented Mar 26, 2018

Could you more fully explain the situation that you are trying to test that is not met by cy.request() and cy.visit() implementation as is? What is your application's behavior that you'd like to test?

Copy link

@Tarig0 Tarig0 commented Apr 15, 2018

Sorry for the late reply. My use case was posting a preformated request and expecting the browser to settle into a certain state.

Today you have to

  1. Visit
  2. Fill in form values
  3. Trigger post

I was looking to skip these steps.

This would be useful for workflow that starts with some sort of post that may be triggered through multiple routes.

Copy link

@brian-mann brian-mann commented Apr 15, 2018

Yeah, I see how this could be useful. It could be like using cy.request like so...

  url: "",
  method: "POST",
  body: {
    some: "values",

This matches how cy.request works except that to pass urlencoded values you have to set { form: true } else it sends the request body as JSON.

With cy.visit() it makes no sense to send anything other than urlencoded values so maybe that option doesn't need to exist.

Copy link

@Paratron Paratron commented Aug 20, 2018

Any update on this?

Copy link

@cypress-bot cypress-bot bot commented Feb 27, 2019

The code for this is done in cypress-io/cypress#3489, but has yet to be released.
We'll update this issue and reference the changelog when it's released.

Copy link

@cypress-bot cypress-bot bot commented Mar 15, 2019

Released in 3.2.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants