Either party may take proof by depositions according to the rules or orders of the court, or have the witnesses examined in open court at pleasure.
Code 1858, § 2462 (deriv. Acts 1835-1836, ch. 26, § 22); Shan., § 4215; mod. Code 1932, § 8440; T.C.A. (orig. ed.), § 36-814.