We consider the contact between elastically soft solids with randomly rough surfaces in sliding contact in a fluid, which is assumed to be Newtonian with constant (pressure-independent) viscosity. We discuss the nature of the transition from boundary lubrication at low sliding velocity, where direct solid-solid contact occurs, to hydrodynamic lubrication at high sliding velocity, where the solids are separated by a thin fluid film. We consider both hydrophilic and hydrophobic systems, and cylinder-on-flat and sphere-on-flat sliding configurations. We show that, for elastically soft solids such as rubber, including cavitation or not results in nearly the same friction.