Former Sen. John Edwards, a two-time presidential candidate, has testified under oath in a lawsuit over a videotape that purportedly depicts him in a sexual encounter, a lawyer for a former Edwards aide said.