I've always used a small vase, or glass that I set up next to the rock where I saw them last. Bait it with fairly meaty food and set it in just after the lights go out. You may need several tries, and catch a few other critters in your tank, but usually this will work. Just make sure the glass is upright enough the crab can't climb out, I've always done about a 45% angle.