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.