Skip to content
Permalink
Browse files
Rogers: Have to wait till the thank you elem appears before checking …
…text
  • Loading branch information
Hainish committed Apr 10, 2014
1 parent ffcb5e3 commit 76f4f8bc488ed56918695ef8cccb80d227adf2af
Showing 1 changed file with 2 additions and 0 deletions.
@@ -64,6 +64,8 @@ contact_form:
- click_on:
- value: Send Email
selector: "form.contactForm.zipform[name='contact'] input[type='submit'][value='Send Email']"
- find:
- selector: "#ctl00_ctl09_ctl00_Text"
success:
headers:
status: 200

3 comments on commit 76f4f8b

@sinak
Copy link
Member

@sinak sinak commented on 76f4f8b Apr 10, 2014

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So just linking this to the #198 so that Jason sees it.

@Hainish
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When this happens and everything looks okay from the screenshot and you get the status "failure", go to the form page yourself and fill in everything exactly how it appears in the screenshot. Then click on the submit. If it submits correctly, either

  1. the success criteria is wrong, or
  2. you need to add an extra "find", like above, for an elem that is in the thank you page but not on the previous page (probably some thank you wrapper elem)

@Hainish
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is because if a form is submitted through javascript and not through a normal form action, congress-forms looks for the success criteria immediately (before the next page is even loaded). This results in a "failure" status, even though it was a successful form submission.

Please sign in to comment.