The rain sensor is located just in front of your rear view mirror on the windshield. You will notice a purple window on the windshield, the sensor is located directly behind this colored area of the glass. When water, this is the big key, settles on the glass light is refracted. The sensor, a light sensitive diode(s), recognizes a change in the angle with regards to the light itself. When it detects the change in angle it informs the “wiper control system” to operate in a manor that is best suited for the amount of water on the glass. No water = No wiping Lots of water = Lots of wiping and any combination there of.
I believe the wipers are programmed to stop wiping when there is no water detected on the glass. You can have the wipers set on high, or any other setting, but if water is not detected the wipers essentially turn themselves off.
A condensed version of late model wiper operations utilizing a Rain Sensor!