Using a particle-in-cell code, we study the diffusive response of electrons due to wave-particle interactions with whistler-mode waves. The relatively simple configuration of field-aligned waves in a cold plasma is used in order to benchmark our novel method, and to compare with previous works that used a different modelling technique. In this boundary-value problem, incoherent whistler-mode waves are excited at the domain boundary, and then propagate through the ambient plasma. Electron diffusion characteristics are directly extracted from particle data across all available energy and pitch-angle space. The 'nature' of the diffusive response is itself a function of energy and pitch-angle, such that the rate of diffusion is not always constant in time. However, after an initial transient phase, the rate of diffusion tends to a constant, in a manner that is consistent with the assumptions of quasilinear diffusion theory. This work establishes a framework for future investigations on the nature of diffusion due to whistler-mode wave-particle interactions, using particle-in-cell numerical codes with driven waves as boundary value problems.Plain Language Summary 'Whistler-mode' plasma waves interact with electrons in the Earth's outer radiation belts. This wave-particle interaction plays a significant role in both electron acceleration, and in the loss of electrons to the atmosphere via 'pitch angle scattering'. Such processes are typically modelled using numerical diffusion codes, with electron diffusion coefficients that characterize the nature and the strength of the wave-particle interaction. These diffusion coefficients are calculated using a mixture of long-established theory and input parameters taken from data and/or empirical models. We present a novel method for the direct extraction of characteristics of the electron diffusion from particle-in-cell numerical experiments. Our results demonstrate that the rate of diffusion can be time-dependent at early times, but then tends to constant values in a manner that is consistent with quasilinear theory.