Product review (5 stars): Lid did not close after installing
This is the exact part that comes with the washer.  I used it for the Whirlpool top load type 587-20.  The sensor snaps into the bottom lid; there are no screws.

Easy to install it but after installation the lid did not close.  I had to make a minor adjustment to the part and it's working perfectly.