The magneto-optical imaging technique is used to visualize the penetration of the magnetic induction in YBa2Cu3O7–δ thin films during surface resistance measurements. The in situ surface resistance measurements were performed at 7 GHz using the dielectric resonator method. When only the microwave magnetic field Hrf is applied to the superconductor, no Hrf-induced vortex penetration is observed, even at high rf power. In contrast, in the presence of a constant magnetic field superimposed on Hrf, we observe a progression of the flux front as Hrf is increased. A local thermometry method based on the measurement of the resonant frequency of the dielectric resonator placed on the YBa2Cu3O7–δ thin film shows that the Hrf–induced flux penetration is due to the increase of the film temperature.