Assert span dates fails on submit but passes on console. Code seems correct. Run Functional Tests using a Headless Browser

Tell us what’s happening:
when I submit the challenge, it states:
You should assert that the element ‘span#dates’ exist and its count is 1.

but all other tests pass, the “should pass all tests” passes, and my code seems correct according to the hint and other online sources such as youtube.

  browser.fill("surname", "Colombo").pressButton("submit", function () {
    browser.assert.text('span#name', 'Cristoforo');
    browser.assert.text('span#surname', 'Colombo');
    browser.assert.element('span#dates', (1));

Your project link(s)


Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.93 Safari/537.36.

Challenge: Run Functional Tests using a Headless Browser

Link to the challenge:

Welcome there,

You appear to have been caught between an update to this challenge. If you re-read the challenge description, you will see a tiny change to the above line.

Hope this helps

Thanks for the insight. I think something is still wrong on the back end of the submit on the website. As stated, I pass the tests when I run it on

the line that I submitted was actually a line that I had after trying many things to change to pass the test.

My original line looks just like the description:

browser.assert.elements('span#dates', 1);

format of expression matches Zombie.js | Zombie
however, that did not work. so I tried (‘span#dates’,1); (‘span#dates’, 1); (‘span#dates’, (1)); (‘span#dates’, [1]); and (‘span#dates’, ‘1’)

again… receives passes all tests on submit (even the one that says passes all tests) except for the last test

You should assert that the element ‘span#dates’ exist and its count is 1.

and clearly that’s been done. I’m moving on to the next module. Please let me know if there’s anything else that I should be looking at/changing and please let me know when the update is complete

Thanks again for the help!

Hmm… I am not sure what is going on. Here is what I had to change to get it working:

  1. Do not return from the setupSuite
  2. Do not chain .fill and .pressButton
browser.fill("surname", "Colombo")
browser.pressButton("submit", function () {
  1. Try the first two. Then, if that does not let you pass, upgrade your version of zombie to at least 6.0.0

Hope this helps

I know this is a late reply but did you figure this out?? I’m getting the same error on the last 2 tests. Everything passes except for the dates and I have no idea why.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.