A method for adding, applied to an electronic device, an operation sequence in form of a shortcut operation in a shortcut operation application, wherein the method comprises: displaying (S701, S702) a first interface of the shortcut operation application, wherein the first interface comprises a first control, and the first control is configured to jump at a second interface of a first application among third-party applications which are installed on the electronic device and are configured to provide a GUI graphical user interface by using a layout file; detecting a first operation performed by a user on the first control; obtaining an event type of the first operation in response to the first operation; determining that the event type of the first operation meets a first preset condition, and obtaining name information of the first application; displaying the second interface in response to the first operation, wherein the second interface belongs to the first application, and the second interface comprises a second control; determining first path information of the second control by using the layout file, wherein the first path information of the second control indicates a position of the second control in a layout of the second interface; detecting a second operation performed by the user on the second control; obtaining an event type of the second operation in response to the second operation; determining that the event type of the second operation meets a second preset condition, and obtaining the first path information of the second control; displaying a third interface of the first application in response to the second operation; saving the name information of the first application, the event type of the first operation, the first path information of the second control, and the event type of the second operation; displaying a fourth interface, wherein the fourth interface belongs to a second application, the fourth interface comprises a third control, and the third control is configured to select the shortcut operation of the first application; detecting a third operation performed by the user on the third control; displaying the second interface in response to the third operation based on the name information of the first application and the event type of the first operation; and displaying the third interface. displaying (S701, S702) a first interface of the shortcut operation application, wherein the first interface comprises a first control, and the first control is configured to jump at a second interface of a first application among third-party applications which are installed on the electronic device and are configured to provide a GUI graphical user interface by using a layout file; detecting a first operation performed by a user on the first control; obtaining an event type of the first operation in response to the first operation; determining that the event type of the first operation meets a first preset condition, and obtaining name information of the first application; displaying the second interface in response to the first operation, wherein the second interface belongs to the first application, and the second interface comprises a second control; determining first path information of the second control by using the layout file, wherein the first path information of the second control indicates a position of the second control in a layout of the second interface; detecting a second operation performed by the user on the second control; obtaining an event type of the second operation in response to the second operation; determining that the event type of the second operation meets a second preset condition, and obtaining the first path information of the second control; displaying a third interface of the first application in response to the second operation; saving the name information of the first application, the event type of the first operation, the first path information of the second control, and the event type of the second operation; displaying a fourth interface, wherein the fourth interface belongs to a second application, the fourth interface comprises a third control, and the third control is configured to select the shortcut operation of the first application; detecting a third operation performed by the user on the third control; displaying the second interface in response to the third operation based on the name information of the first application and the event type of the first operation; and displaying the third interface.