A method of controlling operation of a motorised driving device of a sliding window for a building, the window comprising at least: - a frame, and - a sash (3a, 3b), the motorised driving device being configured to move the sash with respect to the frame, the motorised driving device comprising at least: - an electromechanical actuator, the electromechanical actuator comprising at least one electric motor, and - an electronic control unit, the electronic control unit comprising at least: - a device for measuring a value of an intensity of an electric current flowing through the electric motor, the method comprising at least the following steps: - controlling the electric motor, so as to move the sash with respect to the frame, - during the movement of the sash with respect to the frame, measuring values of the intensity of the electric current flowing through the electric motor by the measuring device, - upon execution of the controlling step, determining a failure of the window, and - following the determination of a fault, during the determining step, signalling of the fault determined, the determining step comprising at least the following sub-step: - comparing values of the intensity of the electric current measured, during the measuring step, with at least one intensity threshold value (S1, S2, S3) during a predetermined period of time (T1, T2, T3), the failure being determined as a function of the result of the comparison, the comparing sub-step being implemented, iteratively, by comparing the values of the intensity of the electric current measured, during the measuring step, with at least one first intensity threshold value during a first predetermined period of time and with at least one second intensity threshold value during a second predetermined period of time. the window comprising at least: - a frame, and - a sash (3a, 3b), - a frame, and - a sash (3a, 3b), the motorised driving device being configured to move the sash with respect to the frame, the motorised driving device comprising at least: - an electromechanical actuator, the electromechanical actuator comprising at least one electric motor, and - an electronic control unit, - an electromechanical actuator, the electromechanical actuator comprising at least one electric motor, and - an electronic control unit, the electronic control unit comprising at least: - a device for measuring a value of an intensity of an electric current flowing through the electric motor, - a device for measuring a value of an intensity of an electric current flowing through the electric motor, the method comprising at least the following steps: - controlling the electric motor, so as to move the sash with respect to the frame, - during the movement of the sash with respect to the frame, measuring values of the intensity of the electric current flowing through the electric motor by the measuring device, - upon execution of the controlling step, determining a failure of the window, and - following the determination of a fault, during the determining step, signalling of the fault determined, - controlling the electric motor, so as to move the sash with respect to the frame, - during the movement of the sash with respect to the frame, measuring values of the intensity of the electric current flowing through the electric motor by the measuring device, - upon execution of the controlling step, determining a failure of the window, and - following the determination of a fault, during the determining step, signalling of the fault determined, the determining step comprising at least the following sub-step: - comparing values of the intensity of the electric current measured, during the measuring step, with at least one intensity threshold value (S1, S2, S3) during a predetermined period of time (T1, T2, T3), the failure being determined as a function of the result of the comparison, - comparing values of the intensity of the electric current measured, during the measuring step, with at least one intensity threshold value (S1, S2, S3) during a predetermined period of time (T1, T2, T3), the failure being determined as a function of the result of the comparison, the comparing sub-step being implemented, iteratively, by comparing the values of the intensity of the electric current measured, during the measuring step, with at least one first intensity threshold value during a first predetermined period of time and with at least one second intensity threshold value during a second predetermined period of time.