Webpage file uploading method and device, computer equipment and storage medium
By intercepting the file selection box loading event, obtaining and filling the preset file path, the efficiency of web file upload is achieved, the problem of inefficiency in traditional methods is solved, and the development process is simplified.
Patent Information
- Application Number
- CN202411801368.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-09
- Publication Date
- 2025-05-06
AI Technical Summary
In traditional web page automation testing, the file upload function is inefficient when handling dynamically loaded upload controls or hidden deep controls, and requires developers to directly operate the DOM elements.
By listening to the loading event of the file selection box, intercept the event, obtain the preset file path, and fill it into the file selection box, file upload is realized, avoiding the need to wait for the file upload control to complete loading and directly operate the DOM element.
It improves the efficiency of web page file upload and simplifies the development process. You can upload files without waiting for the file upload control to complete loading, and there is no need to directly operate the DOM elements of the web page.
Smart Images

Figure CN119939064A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a method, device, computer equipment and storage medium for uploading webpage files. Background Art
[0002] In traditional web page automated testing, the file upload function usually requires developers to locate the file upload control in the Document Object Model (DOM) and enter the file path through the element object's input() method. This method is relatively simple when dealing with static pages, but it is cumbersome and inefficient when dealing with dynamically loaded upload controls or deeply hidden controls. Summary of the invention
[0003] Based on this, it is necessary to provide a web page file uploading method, device, computer equipment and storage medium that can improve the efficiency of web page file uploading in response to the above technical problems.
[0004] A method for uploading a webpage file, the method comprising:
[0005] When the web page listens to the file selection box loading event, intercept the file selection box loading event;
[0006] Get the preset file path;
[0007] Fill the preset file path into the file selection box corresponding to the file selection box loading event;
[0008] Upload the file corresponding to the preset file path through the file selection box.
[0009] In one embodiment, before a web page monitors a file selection box loading event, the following steps are performed:
[0010] Simulate user click operations to trigger and generate user click events;
[0011] Send a user click event to the user page of the web application, triggering the document object model DOM element of the file selection box to load;
[0012] Set up event listeners during the loading process to listen to browser events;
[0013] Determine whether the browser event is a file selection box loading event.
[0014] In one embodiment, the method further comprises:
[0015] When it is determined that the browser event is not a file selection box loading event, the function exception is recorded;
[0016] Feedback exception function.
[0017] In one embodiment, intercepting a file selection box loading event includes:
[0018] Operate the browser system level interface to run file selection commands;
[0019] Intercept the file selection loading event through the file selection command.
[0020] In one embodiment, filling the preset file path into the file selection box corresponding to the file selection box loading event also includes:
[0021] Verify that the preset file path is valid;
[0022] When the verification is valid, the preset file path is input into the file selection box corresponding to the file selection box load event.
[0023] In one embodiment, uploading a file corresponding to a preset file path through a file selection box includes:
[0024] Simulate the upload operation of the user clicking the file selection box;
[0025] Get the file corresponding to the preset file path according to the upload operation.
[0026] In one embodiment, the method further comprises:
[0027] Monitor the upload status of files;
[0028] When the upload status is failed, return to the step of intercepting the file selection box loading event when the web page listens to the file selection box loading event until the upload status is successful.
[0029] A web page file uploading device, the device comprising:
[0030] The interception module is used to intercept the file selection box loading event when the web page monitors the file selection box loading event;
[0031] The acquisition module is used to obtain the preset file path;
[0032] A filling module is used to fill the preset file path into the file selection box corresponding to the file selection box loading event;
[0033] The upload module is used to upload files corresponding to the preset file path through the file selection box.
[0034] A computer device comprises a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the following steps are implemented:
[0035] When the web page listens to the file selection box loading event, intercept the file selection box loading event;
[0036] Get the preset file path;
[0037] Fill the preset file path into the file selection box corresponding to the file selection box loading event;
[0038] Upload the file corresponding to the preset file path through the file selection box.
[0039] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0040] When the web page listens to the file selection box loading event, intercept the file selection box loading event;
[0041] Get the preset file path;
[0042] Fill the preset file path into the file selection box corresponding to the file selection box loading event;
[0043] Upload the file corresponding to the preset file path through the file selection box.
[0044] The web page file uploading method, device, computer equipment and storage medium intercept the file selection box loading event, obtain the preset file path, fill the preset file path into the file selection box corresponding to the file selection box loading event, and upload the file corresponding to the preset file path through the file selection box. Therefore, by intercepting the file selection box loading event, obtaining the preset file path, uploading the file corresponding to the preset file path into the file selection box, and submitting the upload, there is no need to wait for the file upload control to upload the file after the page is loaded, and there is no need to directly operate the DOM element of the web page, thereby improving the efficiency of file uploading in the web page. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A diagram showing an application environment of a webpage file uploading method in one embodiment;
[0046] Figure 2 A schematic diagram of a process of uploading a webpage file in one embodiment;
[0047] Figure 3 A schematic diagram of a page of a method for uploading a webpage file in one embodiment;
[0048] Figure 4 A schematic diagram of a process of uploading a webpage file in one embodiment;
[0049] Figure 5A schematic diagram of a process of uploading a webpage file in one embodiment;
[0050] Figure 6 A schematic diagram of a flow chart of an interception step in an embodiment;
[0051] Figure 7 A flowchart of a filling step in one embodiment;
[0052] Figure 8 A flowchart of a file uploading step in an embodiment;
[0053] Fig. 9 A schematic diagram of a process flow of a file status monitoring step in an embodiment;
[0054] Fig.10 A structural block diagram of a web page file uploading device in one embodiment;
[0055] Fig.11 is an internal structure diagram of a computer device in one embodiment;
[0056] Fig.12 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0057] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0058] The webpage file uploading method provided by this application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The terminal 102 may be, but is not limited to, various personal computers, laptops, smart phones, tablet computers, and portable wearable devices, and the server 104 may be implemented as an independent server or a server cluster consisting of multiple servers.
[0059] Specifically, when the web page in terminal 102 listens to the file selection box loading event, it intercepts the file selection box loading event, obtains the preset file path from server 104, and sends it to terminal 102. Terminal 102 fills the preset file path into the file selection box corresponding to the file selection box loading event, and uploads the file corresponding to the preset file path through the file selection box.
[0060] In another embodiment, when the web page monitors the file selection box loading event, the server 104 intercepts the file selection box loading event, obtains the preset file path, fills the preset file path into the file selection box corresponding to the file selection box loading event, and uploads the file corresponding to the preset file path through the file selection box.
[0061] In one embodiment, Figure 2 As shown, a web page file upload method is provided, which is applied to Figure 1 The terminal or server in the example is used to illustrate, including the following steps:
[0062] Step 202: When the web page monitors the file selection box loading event, the file selection box loading event is intercepted.
[0063] The file selection box loading event refers to an event triggered when a file selection box is loaded in a web page. For example, a file upload control in a web page can be triggered to generate a file selection box loading event.
[0064] Specifically, the web page simulates a user click operation, triggers the loading of elements related to the file selection box through the user click operation, and monitors and waits for the file selection box to pop up. Once the web page monitors the occurrence of the file selection box loading event, the file selection box loading event is intercepted.
[0065] Step 204, obtaining a preset file path.
[0066] Step 206: Fill the preset file path into the file selection box corresponding to the file selection box loading event.
[0067] Specifically, when a file selection box loading event is detected on a web page, the file selection box loading event is intercepted, the file selection box is intercepted, and a preset file path is provided as a user's choice without actual user interaction and without the need for a DOM structure applied through the web page.
[0068] Among them, the preset file path can be determined according to actual business needs, actual product needs and application scenarios. It is the storage location of the file to be uploaded. After obtaining the preset file path, the file path is automatically filled in the file selection box corresponding to the file selection box loading event.
[0069] Step 208: Upload the file corresponding to the preset file path through the file selection box.
[0070] Specifically, after the preset file path is filled, the user is simulated to click the "Open" or "OK" button of the file selection box to upload the file corresponding to the preset file path, thereby completing the file upload operation. Figure 3 As shown, Figure 3A schematic diagram of a page showing a method for uploading a web page in one embodiment is shown. Figure 3 The web page shown is provided with an "Upload File" control, which simulates the upload operation on the control. Through the above method, you can directly see the sign that file 1 has been successfully uploaded. There is no need to jump out of the file selection box and select a file. You only need to operate the "Upload File" control once to successfully upload file 1.
[0071] In the above web page file upload method, when the web page monitors the file selection box loading event, the file selection box loading event is intercepted, the preset file path is obtained, the preset file path is filled into the file selection box corresponding to the file selection box loading event, and the file corresponding to the preset file path is uploaded through the file selection box. Therefore, by intercepting the file selection box loading event, obtaining the preset file path, uploading the file corresponding to the preset file path into the file selection box, and submitting the upload, there is no need to wait for the file upload control to upload the file after the page is loaded, and there is no need to directly operate the DOM element of the web page, thereby improving the efficiency of file uploading in the web page.
[0072] In one embodiment, Figure 4 As shown, before the web page listens to the file selection box loading event, it includes:
[0073] Step 402: Simulate a user click operation to trigger the generation of a user click event.
[0074] Step 404: Send the user click event to the user page of the web application to trigger the document object model DOM element of the file selection box to load.
[0075] Step 406, setting an event listener during the loading process to listen to browser events.
[0076] Step 408, determining whether the browser event is a file selection box loading event.
[0077] Specifically, an automated test script can be installed on the web page, and the automated test script can be used to simulate a user click operation and generate a user click event. Specifically, the automated test script can simulate a user click operation and call the click() method, and trigger the loading of the document object model DOM element of the file selection box by sending a mouse click event to the user interface of the web page application. Among them, the document object model DOM provides an access model for the entire web page, and treats the web page as a tree structure, and each node of the tree represents an HTML tag or a text item in the tag.
[0078] Furthermore, during the loading process of the document object model DOM element of the file selection box, an event listener is set in the automated test script, and the event listener listens to browser events and waits for the event of the file selection box popping up. The browser event is various events that occur in the web page, including the file selection box loading event. Finally, it is determined whether the monitored browser event is the file selection box loading event. If so, it is intercepted, and if not, feedback is given.
[0079] In one embodiment, Figure 5 As shown, the above method also includes:
[0080] Step 502: When it is determined that the browser event is not a file selection box loading event, a function exception is recorded.
[0081] Step 504: Feedback the abnormal function.
[0082] Among them, browser events are various events that occur in web pages. Therefore, it is necessary to determine whether a file selection box loading event occurs. Specifically, after monitoring the browser event, determine whether the browser event is a file selection box loading event. If so, intercept it. If not, and the file selection box loading time has not been detected within the preset time, record the function exception, obtain the abnormal function, and feedback the abnormal function. The developer can determine that the file selection box loading cannot appear on the web page this time based on the abnormal function, and make modifications to avoid this situation from happening again.
[0083] In one embodiment, Figure 6 As shown, intercept the file selection box loading event, including:
[0084] Step 602: operate the browser system level interface to execute a file selection command.
[0085] Step 604: intercepting a file selection loading event through a file selection command.
[0086] Among them, intercepting the file selection box loading event can be specifically, listening to the file selection box loading event ('Page.fileChooserOpened') when it occurs, and the automated test script runs the 'Page.setInterceptFileChooserDialog' command through the browser system-level interface API, intercepts the file selection operation returned in the browser event, intercepts this dialog box, and provides a preset file path as the user's choice without the need for actual user interaction and without going through the DOM structure of the web application of the web page.
[0087] In one embodiment, Figure 7As shown, the preset file path is filled into the file selection box corresponding to the file selection box loading event, and also includes:
[0088] Step 702, verify whether the preset file path is valid.
[0089] Step 704, when the verification is valid, the preset file path is input into the file selection box corresponding to the file selection box loading event.
[0090] Among them, before filling in the preset file path, the automated test script will verify the validity of the preset file path to ensure that the filled-in preset file path points to one or more real existing files. After the verification, the automated test script will fill the preset file path into the file selection box corresponding to the file selection box loading event, simulating the user selecting one or more files.
[0091] In one embodiment, Figure 8 As shown, upload the file corresponding to the preset file path through the file selection box, including:
[0092] Step 802, simulating an upload operation in which a user clicks a file selection box.
[0093] Step 804: Obtain the file corresponding to the preset file path according to the upload operation.
[0094] Among them, after the preset file path is filled in, the automated test script simulates the upload operation of the user clicking the file selection box, such as the "Open" or "OK" button, and executes the method upload() through the browser CDP signaling, traversing the upload file list upload_list to be uploaded, and completing the file upload operation.
[0095] In one embodiment, Fig. 9 As shown, the above method also includes:
[0096] Step 902, monitoring the upload status of the file.
[0097] Step 904, when the upload status is failed, return to the step of intercepting the file selection box loading event when the web page monitors the file selection box loading event, until the upload status is successful.
[0098] The automated test script can also monitor the status of file uploads, including upload progress, upload success or failure prompts, and during the entire file upload process, the automated test script can capture and record any exceptions or errors. Specifically, the automated test script monitors the upload status corresponding to the uploaded file. When the upload status is failed, it means that the file upload of the web page has failed, and it needs to be re-uploaded. When the web page monitors the file selection box loading event, it intercepts the file selection box loading event and re-uploads the file until the upload status is successful.
[0099] It should be understood that, although the various steps in the above-mentioned flow chart are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps is not strictly limited in order, and these steps can be executed in other orders. Moreover, at least a part of the steps in the above-mentioned flow chart may include a plurality of sub-steps or a plurality of stages, and these sub-steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these sub-steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the sub-steps or stages of other steps.
[0100] In one embodiment, Fig.10 As shown, a webpage file uploading device 1000 is provided, comprising: an interception module 1002, an acquisition module 1004, a filling module 1006 and an uploading module 1008, wherein:
[0101] The interception module 1002 is used to intercept the file selection box loading event when the web page monitors the file selection box loading event.
[0102] The acquisition module 1004 is used to acquire a preset file path.
[0103] The filling module 1006 is used to fill the preset file path into the file selection box corresponding to the file selection box loading event.
[0104] The upload module 1008 is used to upload the file corresponding to the preset file path through the file selection box.
[0105] In one embodiment, the web file upload device 1000 simulates a user click operation to trigger a user click event, sends the user click event to the user page of the web application, triggers the document object model DOM element of the file selection box to load, sets an event listener during the loading process, listens to browser events, and determines whether the browser event is a file selection box loading event.
[0106] In one embodiment, after determining that the browser event is not a file selection box loading event, the webpage file uploading device 1000 records the function exception and feeds back the abnormal function.
[0107] In one embodiment, the interception module 1002 operates the browser system level interface to run the file selection command, and intercepts the file selection loading event through the file selection command.
[0108] In one embodiment, the filling module 1006 verifies whether the preset file path is valid, and when it is verified to be valid, inputs the preset file path into the file selection box corresponding to the file selection box loading event.
[0109] In one embodiment, the upload module 1008 simulates an upload operation of a user clicking a file selection box, and obtains a file corresponding to a preset file path according to the upload operation.
[0110] In one embodiment, the web page file uploading device 1000 monitors the upload status of the file, and when the upload status is failed, returns to the step of intercepting the file selection box loading event when the web page monitors the file selection box loading event, until the upload status is successful.
[0111] The specific definition of the web page file uploading device can be found in the definition of the web page file uploading method mentioned above, which will not be repeated here. Each module in the above web page file uploading device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.
[0112] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Fig.11 As shown. The computer device includes a processor, a memory, a network interface and a database connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store files. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for uploading webpage files is implemented.
[0113] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.12As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for uploading a web page file is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covering the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0114] Those skilled in the art will understand that Fig.11 or Fig.12 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0115] In one embodiment, a computer device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the following steps are implemented: when a web page listens to a file selection box loading event, the file selection box loading event is intercepted, a preset file path is obtained, the preset file path is filled into a file selection box corresponding to the file selection box loading event, and a file corresponding to the preset file path is uploaded through the file selection box.
[0116] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0117] Simulate user click operations to trigger and generate user click events;
[0118] Send a user click event to the user page of the web application, triggering the document object model DOM element of the file selection box to load;
[0119] Set up event listeners during the loading process to listen to browser events;
[0120] Determine whether the browser event is a file selection box loading event.
[0121] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0122] When it is determined that the browser event is not a file selection box loading event, the function exception is recorded;
[0123] Feedback exception function.
[0124] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0125] Operate the browser system level interface to run file selection commands;
[0126] Intercept the file selection loading event through the file selection command.
[0127] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0128] Verify that the preset file path is valid;
[0129] When the verification is valid, the preset file path is input into the file selection box corresponding to the file selection box load event.
[0130] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0131] Simulate the upload operation of the user clicking the file selection box;
[0132] Get the file corresponding to the preset file path according to the upload operation.
[0133] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0134] Monitor the upload status of files;
[0135] When the upload status is failed, return to the step of intercepting the file selection box loading event when the web page listens to the file selection box loading event until the upload status is successful.
[0136] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: when a web page listens to a file selection box loading event, the file selection box loading event is intercepted, a preset file path is obtained, the preset file path is filled into a file selection box corresponding to the file selection box loading event, and a file corresponding to the preset file path is uploaded through the file selection box.
[0137] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0138] Simulate user click operations to trigger and generate user click events;
[0139] Send a user click event to the user page of the web application, triggering the document object model DOM element of the file selection box to load;
[0140] Set up event listeners during the loading process to listen to browser events;
[0141] Determine whether the browser event is a file selection box loading event.
[0142] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0143] When it is determined that the browser event is not a file selection box loading event, the function exception is recorded;
[0144] Feedback exception function.
[0145] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0146] Operate the browser system level interface to run file selection commands;
[0147] Intercept the file selection loading event through the file selection command.
[0148] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0149] Verify that the preset file path is valid;
[0150] When the verification is valid, the preset file path is input into the file selection box corresponding to the file selection box load event.
[0151] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0152] Simulate the upload operation of the user clicking the file selection box;
[0153] Get the file corresponding to the preset file path according to the upload operation.
[0154] In one embodiment, when the processor executes the computer program, the processor further implements the following steps:
[0155] Monitor the upload status of files;
[0156] When the upload status is failed, return to the step of intercepting the file selection box loading event when the web page listens to the file selection box loading event until the upload status is successful.
[0157] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0158] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0159] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A method for uploading a webpage file, the method comprising: When the web page monitors the file selection box loading event, intercept the file selection box loading event; Get the preset file path; Fill the preset file path into the file selection box corresponding to the file selection box loading event; Upload the file corresponding to the preset file path through the file selection box.
2. The method according to claim 1, characterized in that Before the web page monitors the file selection box loading event, it includes: Simulate user click operations to trigger and generate user click events; Sending the user click event to the user page of the web application to trigger the document object model DOM element of the file selection box to load; Set up event listeners during the loading process to listen to browser events; Determine whether the browser event is the file selection box loading event.
3. The method according to claim 2, characterized in that: The method further comprises: When it is determined that the browser event is not the file selection box loading event, recording a function exception; Feedback exception function.
4. The method according to claim 1, characterized in that: The intercepting the file selection box loading event includes: Operate the browser system level interface to run file selection commands; The file selection loading event is intercepted through the file selection command.
5. The method according to claim 1, characterized in that The step of filling the preset file path into the file selection box corresponding to the file selection box loading event further includes: Verify whether the preset file path is valid; When the verification is valid, the preset file path is input into the file selection box corresponding to the file selection box loading event.
6. The method according to claim 1, characterized in that The uploading of the file corresponding to the preset file path through the file selection box includes: Simulate the upload operation of the user clicking the file selection box; The file corresponding to the preset file path is obtained according to the upload operation.
7. The method according to claim 1, characterized in that The method further comprises: monitoring the upload status of the file; When the upload status is failed, return to the step of intercepting the file selection box loading event when the web page monitors the file selection box loading event until the upload status is successful.
8. A web page file uploading device, characterized in that: The device comprises: An interception module, used for intercepting the file selection box loading event when the web page monitors the file selection box loading event; The acquisition module is used to obtain the preset file path; A filling module, used to fill the preset file path into the file selection box corresponding to the file selection box loading event; The upload module is used to upload the file corresponding to the preset file path through the file selection box.
9. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are implemented.