New member, new XF owner, new electrical problem! Auto wipers not working

Hello all, I’ve just acquired my first Jaguar, a 2008 XF SV8 and am very much enjoying it. I have a 130km round-trip daily commute and this will be my primary commuter vehicle. The car is in excellent condition and seems to me to drive like new; however I’ve struck one niggling fault that has been a pain as we’ve had unusually wet summer weather over the past week. The rain-sensing automatic wiper setting does not work, no wiping at all on auto setting regardless of how much water is on the windscreen.
The sensor on the windscreen- behind the rear-view mirror- does not appear to be in full contact with the glass- I’m thinking perhaps the windscreen has been replaced and the sensor was not properly fitted. Is this a reasonable place to start troubleshooting this problem? If so, how should the sensor be installed to a new screen?

Stop press; it needed a replacement silicon pad between the rain sensor and the windscreen. Auto wipers now work as they should. Pad was sourced from a windscreen shop.