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 with 2 additions and 0 deletions.
  1. +2 −0 members/R000395.yaml
View
@@ -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

This comment has been minimized.

Show comment
Hide comment
@sinak

sinak Apr 10, 2014

Member

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

Member

sinak replied Apr 10, 2014

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

@Hainish

This comment has been minimized.

Show comment
Hide comment
@Hainish

Hainish Apr 10, 2014

Contributor

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)
Contributor

Hainish replied Apr 10, 2014

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

This comment has been minimized.

Show comment
Hide comment
@Hainish

Hainish Apr 10, 2014

Contributor

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.

Contributor

Hainish replied Apr 10, 2014

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.