Digital learning environments such as virtual laboratories have been proposed to augment or even replace conventional forms of teaching in recent years. While there is some evidence on comparable learning outcomes between real and virtual labs, empirical evidence on the effectiveness of virtual labs as compared to conventional face-to-face teaching is largely lacking. Here, we used the virtual lab platform Labster in a first-year undergraduate course on general biology to evaluate its effectiveness against conventional teaching using a repeated measure randomized control trial (treatment group n = 131, control group n = 108). We find no evidence for a difference in terms of learning success between treatment and control groups, consistent with empirical studies on real vs. virtual labs. However, Labster exposure led to a more positive attitude towards e-learning, and a positive user experience was the strongest predictor of individual learning success, highlighting the importance of engagement in digital learning environments.