Question: a deposition is oral testimony given by a party or witness during the trial

Answer: Yes, A deposition in the law of the United States, or examination for discovery in the law of Canada, involves the taking of sworn, out-of-court oral testimony of a witness that may be reduced to a written transcript for later use in court or for discovery purposes. Depositions are commonly used in litigation in the United States and Canada. They are almost always conducted outside court by the lawyers themselves, with no judge present to supervise the examination.