Full disclosure: you can.
You need to go to a mechanic, have them clear the fault code, drive for just long enough for the emissions tester to detect the car has been driven enough to pass the test, but not long enough that the engine light comes on.
I certainly never did this to pass emissions on a 2000 Camry that had 4 (!) catalytic converters replaced within 4 years. That is a $700 part FYI. Luckily two of them failed under warranty, and my mechanic handled the RMAs, so I only spent $1400 out of pocket before totally not using the workaround.
To the larger issue of car maintenance, fines, and undue burden on the poor:
Cracked windshields often happen due to roadway debris, rather than improper maintenance on the part of the car owner. Small rock gets kicked up into your windshield from the car in front of you, creates an almost imperceptible divot in the windshield. Weeks later, you hit a pothole, and you get a huge crack clear across the windshield with that divot in the center. It then spiderwebs every time you hit another pothole.
If you have comprehensive coverage on your auto insurance, it is almost always covered for free. If you have only the state-mandated liability coverage, you are paying out of pocket for the repair, in addition to the fine for the broken windshield.
Angieslist reports that the average driver paid $214 for windshield replacement.
So you are talking about a $214 repair and a $200 ticket. That's $414.
Not chump change by any means.