Not able to pass the nav link test but the link works

can someone let me know what i did wrong i’m not able to pass the test of

.nav-link

product landing page

1 Like

@JuveriaD, when a test fails click the red button to see which test(s) are failing and text to help you correct the issue.
Be sure and read more than just the first line of the failing message. The ability to read and comprehend error messages is a skill you’ll need to acquire as a developer. Ask questions on what you don’t understand.

The full failing message says;

When I click a .nav-link button in the nav element, I am taken to the corresponding section of the landing page.'
The .nav-link with href="#" is not linked to a corresponding element on the page : expected null to not equal null
AssertionError: The .nav-link with href="#" is not linked to a corresponding element on the page : expected null to not equal null

Have searched the error on google but don’t understand it and still I don’t get it what it actually means because the link is working fine :thinking:

You have three nav-link elements but only two that actually go to a section in your code.
This one, <a href="#" class="nav-link"> is what’s mentioned in the failing test message and is why the test fails. It does not go anywhere.
If you click the ‘products’ link in your nav nothing happens.

1 Like

omg!!! it was that :woman_facepalming:t4:
Thanks a lott

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