html.test.complete element

Home Forums Support html.test.complete element

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #2750
    Jan Chromý
    Guest

    Hi,

    I would like to thank you very much for the PennController. It seems to be super useful!

    I have one minor question. I am struggling with the html.test.complete element. I adopted the code below from the Documentation in my script:

    newHtml("demographics", "example_intro.html")
        .print()
    ,
    newButton("continue", "Continue to the next page")
        .print()
        .wait(
            getHtml("demographics").test.complete()
                .failure( getHtml("demographics").warn() )
        )


    However, there seems to be a problem with the last row (starting “.failure”). When I remove this row, everything works, but I do not get any error message when the obligatory fields are not filled in. I assume there must be a problem in the communication with the html file (which works well under “normal” Ibex coding). Do you have any tips how to solve this?

    (In the example_intro.html file, I use this coding for each obligatory field: <label class=”error” for=”FIELD_NAME”></label>)

    All the best,

    Jan Chromý
    Charles University

    • This topic was modified 6 years, 2 months ago by Jeremy.
    • This topic was modified 6 years, 2 months ago by Jeremy. Reason: Formatting the code for the forums
    #2754
    Jeremy
    Keymaster

    Hi Jan,

    I’m glad to see that you are using PennController. I can’t determine what is causing the error in your case, as the script seems to be working just fine from the documentation, and your coding also seems appropriate.
    What happens exactly when you leave the line there? What you can do is open your browser’s javascript console (in Firefox: Tools > Web Developer > Web Console; in Chrome: View > Developer > JavaScript Console) and look for any error message that could be related to your issue.

    Best
    Jeremy

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.