A method, device, electronic device and storage medium for character input
By using the symbol correspondence of the character input device in automated tests, converting and sending target symbols to the display screen, the problem of manually inputting characters in automated tests is solved, and the efficiency of automated tests is improved.
Patent Information
- Application Number
- CN202111551245.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2024-11-15
- Estimated Expiration
- 2041-12-17
AI Technical Summary
In automated testing, characters need to be manually entered into the input box, resulting in a low degree of automation and affecting the testing efficiency.
By obtaining the characters to be input and detecting that the electronic device establishes a communication connection with the character input device, the characters to be input are converted into target symbols based on the correspondence between the characters and symbols that can be recognized by the character input device, and send The character input device is inputted so that it enters characters on the display screen of the electronic device and converts the target symbol into the characters to be entered for display.
It realizes automated input without manual input of characters in automated tests, which improves testing efficiency and improves the degree of automation.
Smart Images

Figure CN114397965B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of automated testing, and specifically relates to a method, device, electronic device and storage medium for character input. Background Art
[0002] The main function of security controls is to protect key data such as passwords. In order to protect the security of user accounts and key user data, banks usually need to install security controls and require the input of sensitive information such as passwords on security controls. Usually, security controls are implemented using low-level keyboard hooks. Security controls are usually bound to keyboard input and output, which means that information must be entered into the input box of the security control.
[0003] In the automated testing of security controls, people are required to manually input information into the input box, so the degree of automation is low. Summary of the invention
[0004] The embodiments of the present application provide a method, device, electronic device and storage medium for character input, which can simulate the actual input of characters in a character input box, solve the problem of manual input of information in the input box and low degree of automation, and can improve the efficiency of automated testing.
[0005] In a first aspect, an embodiment of the present application provides a method for character input, the method comprising: obtaining a character to be input, and upon detecting that a communication connection is established between an electronic device and a character input device, converting the character to be input into a corresponding target symbol based on a correspondence between the character and a symbol recognizable by the character input device, sending the target symbol to the character input device, having the character input device input the target symbol into a character input box on a display screen of the electronic device, and converting the target symbol into the character to be input for display based on the correspondence.
[0006] In a second aspect, an embodiment of the present application provides a device for character input, which includes: an acquisition module for acquiring characters to be input; a conversion module for converting the characters to be input into corresponding target symbols based on the correspondence between characters and symbols recognizable by the character input device when it is detected that a communication connection is established between the electronic device and the character input device; an input module for sending the target symbol to the character input device, and the character input device inputs the target symbol into a character input box on the display screen of the electronic device; and a display module for converting the target symbol into the characters to be input for display based on the correspondence.
[0007] In a third aspect, an embodiment of the present application provides an electronic device, which includes a processor, a memory, and a program or instruction stored in the memory and executable on the processor, wherein the program or instruction, when executed by the processor, implements the steps of the method described in the first aspect.
[0008] In a fourth aspect, an embodiment of the present application provides a readable storage medium, on which a program or instruction is stored, and when the program or instruction is executed by a processor, the steps of the method described in the first aspect are implemented.
[0009] In an embodiment of the present application, by obtaining the character to be input, when it is detected that the electronic device and the character input device have established a communication connection, based on the correspondence between the character and the symbol recognizable by the character input device, the character to be input is converted into the corresponding target symbol, the target symbol is sent to the character input device, and the character input device inputs the target symbol into the character input box on the display screen of the electronic device, and based on the correspondence, the target symbol is converted into the character to be input for display, which can solve the problem of manual input of characters in automated testing and improve the efficiency of automated testing. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] Figure 1 It is a flowchart of a method for character input provided in an embodiment of the present application;
[0011] Figure 2 It is a flowchart of another character input method provided in an embodiment of the present application;
[0012] Figure 3 It is a flowchart of another character input method provided in an embodiment of the present application;
[0013] Figure 4 It is a flowchart of another character input method provided in an embodiment of the present application;
[0014] Figure 5 is a schematic diagram of the structure of a device for character input provided in an embodiment of the present application;
[0015] Figure 6 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application;
[0016] Figure 7 It is a schematic diagram of the structure of another electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0017] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0018] In conjunction with the accompanying drawings, a method, device, electronic device and storage medium for character input provided by an embodiment of the present application are described in detail below through specific embodiments and their application scenarios.
[0019] Figure 1 A method for character input provided by an embodiment of the present invention is shown, and the method can be executed by an electronic device, and the electronic device may include: a terminal device, etc. In other words, the method can be executed by software or hardware installed in the electronic device, and the method includes the following steps:
[0020] Step 102: Obtain characters to be input.
[0021] Specifically, the characters to be input are preset, and during the automated test, the electronic device can obtain the preset characters to be input.
[0022] Step 104: when it is detected that the electronic device has established a communication connection with the character input device, based on the correspondence between the character and the symbol recognizable by the character input device, convert the character to be input into the corresponding target symbol.
[0023] Specifically, the electronic device first detects whether a communication connection is established with the character input device. When it is determined that a communication connection has been established with the character input device, the character to be input is converted into a corresponding target symbol based on the correspondence between the character and the symbol recognizable by the character input device.
[0024] Among them, the correspondence between characters and symbols recognizable by the character input device is determined by the properties of the character input device. For example, if the character to be input is A, and the character input device can recognize the symbol 0xA corresponding to the character A, then the electronic device can convert the character A to be input into the symbol 0xA recognizable by the character input device.
[0025] In addition, the character input device may be a Universal Serial Bus (USB) keyboard controller, which can realize the same function as the input unit of the electronic device, that is, it can realize the function of inputting characters on the display screen of the electronic device. Of course, optionally, in order to reduce the size of the character input device, the character input device may not be provided with a user operation area, that is, no keyboard is provided.
[0026] It is understandable that the character input device may be a device not integrated on the electronic device, that is, the character input device can establish a communication connection with the electronic device through an interface connection. Of course, the character input device may also be integrated on the electronic device.
[0027] Step 106: Send the target symbol to the character input device, and the character input device inputs the target symbol into a character input box on the display screen of the electronic device.
[0028] Specifically, after converting the character to be input into the target symbol, the electronic device sends the target symbol to the character input device, and the character input device inputs the target symbol into the character input box on the display screen of the electronic device after receiving the target symbol.
[0029] In this step, by sending the target symbol to the character input device, and then the character input device inputs the target symbol into the character input box on the display screen of the electronic device, in the automated test, the electronic device can simulate inputting characters in the character input box on the display screen of the electronic device through the hardware device, which can solve the problem of manual input of characters in the automated test and improve the efficiency of the automated test.
[0030] Step 108: Based on the corresponding relationship, convert the target symbol into the character to be input for display.
[0031] The electronic device converts the target symbol into the character to be input according to the correspondence between the character and the symbol recognizable by the character input device, and displays the character to be input, thereby realizing automatic input of the character into the input box on the display screen through the character input device.
[0032] A method for character input provided by an embodiment of the present invention obtains a character to be input, and when it is detected that an electronic device has established a communication connection with a character input device, based on the correspondence between the character and the symbol recognizable by the character input device, converts the character to be input into a corresponding target symbol, sends the target symbol to the character input device, and the character input device inputs the target symbol into a character input box on a display screen of the electronic device, and based on the correspondence, converts the target symbol into the character to be input for display. In automated testing, the method can simulate inputting the character to be input into the display screen of the electronic device through ordinary hardware input, thereby solving the problem of low automation level caused by the need for manual input of characters in the input box in automated testing, and improves the efficiency of automated testing.
[0033] In one implementation, the obtaining of the characters to be input includes: running a character input request instruction in an automated test script, responding to the character input request instruction, displaying the character input box, and obtaining the characters to be input.
[0034] Specifically, the electronic device needs to run an automated test script for automated testing. The automated test script encapsulates a character input request instruction. During the automated test, the character input request instruction is run. The character input request instruction is used to request the electronic device to input characters to be input.
[0035] In this embodiment, the electronic device displays a character input box on the display screen and obtains characters to be input in response to the character input request instruction.
[0036] The character input box is used to input and display characters to be input. In addition, the character input box can be a security control password box.
[0037] By running the character input request instruction in the automated test script, the electronic device can respond to the character input request instruction, display a character input box on the display screen, and obtain the characters to be input, thereby solving the problem of low automation level in automated testing where characters need to be manually input in the input box.
[0038] In one implementation, Figure 2 As shown, the detection of establishing a communication connection between the electronic device and the character input device includes the following steps:
[0039] Step 202: Run the device detection program in the automated test script.
[0040] Specifically, during the automated test, a device detection program in the automated test script is run, and the device detection program is used to detect whether the electronic device has established a communication connection with the character input device.
[0041] The device detection program may be a device detection method function encapsulated in an automated test script, and the device detection method function is called when the automated test script is run.
[0042] Specifically, the device detection method function may be a get_key_dev method function.
[0043] Step 204: responding to the device detection program, detecting whether the electronic device has established a communication connection with the character input device, and obtaining a detection result.
[0044] Specifically, the electronic device responds to the device detection program, detects whether a communication connection is established with the character input device, and obtains the detection result.
[0045] The character input device may be an external device. In addition, the character input device may be connected to the electronic device via a USB interface.
[0046] Step 206: When the detection result indicates that the electronic device has established a communication connection with the character input device, determine that the electronic device has established a communication connection with the character input device.
[0047] Specifically, the electronic device obtains a detection result of a device detection program, and if the detection result indicates that the electronic device establishes a communication connection with the character input device, it is determined that the electronic device establishes a communication connection with the character input device.
[0048] By running the device detection program in the automated test script, it is detected whether the electronic device has established a communication connection with the character input device, and the detection result is obtained. When the detection result indicates that the electronic device has established a communication connection with the character input device, it is determined that the electronic device has established a communication connection with the character input device, so that the electronic device can determine whether to establish a communication connection with the character input device, thereby preventing the subsequent automated test process from being executed when the electronic device is not connected to the input device, thereby avoiding invalid automated testing.
[0049] In one implementation, Figure 3 As shown, the conversion of the character to be input into the corresponding target symbol based on the correspondence between the character and the symbol recognizable by the character input device comprises the following steps:
[0050] Step 302: Run the character conversion program in the automated test script.
[0051] Specifically, the character conversion program in the automated test script is run, and the character conversion program is used to convert the characters to be input. The character conversion program is provided with a correspondence between the characters to be input and the symbols recognizable by the character input device, for example, the correspondence is: the symbol recognizable by the character input device corresponding to the character A to be input is 0xA, and the symbol recognizable by the character input device corresponding to the character B to be input is 0xB.
[0052] In addition, specifically, the character conversion program may be a character conversion program method function encapsulated in an automated test script, and the character conversion method function is run when the automated test script is run.
[0053] Specifically, the character conversion method function may be a key_send_str method function.
[0054] Step 304: In response to the character conversion program, convert the character to be input into the target symbol.
[0055] Specifically, when the electronic device runs the character conversion program, it responds to the character conversion program and converts the character to be input into a target symbol, which is a symbol that the character input device can recognize. For example, if the character to be input is B, the electronic device converts the character to be input B into the target symbol 0xB.
[0056] The electronic device converts the characters to be input into the target symbols by running the character conversion program in the automated test script and responding to the character conversion program, so that the characters to be input can be converted into symbols that can be recognized by the character input device.
[0057] Optional, combine the following Figure 4 , an embodiment of the present application is described, and the embodiment includes the following steps:
[0058] Step 402: Obtain characters to be input.
[0059] During automated testing, a character input request instruction in the automated testing script is run. The instruction is used to request the electronic device to input characters to be input. The characters to be input are pre-set characters. In response to the character input request instruction, the electronic device displays a character input box on the display screen and obtains the characters to be input.
[0060] Step 404: Detect whether the electronic device has established a communication connection with the character input device.
[0061] The device detection program in the automated test script is run. The program may be a device detection method function encapsulated in the automated test script. In response to the program, the electronic device detects whether a communication connection is established with the character input device.
[0062] If the communication connection with the character input device is not established, an abnormal message will be reported.
[0063] In addition, the electronic device can be communicatively connected with the character input device via a USB interface.
[0064] This step can detect whether the electronic device has established a communication connection with the character input device, and execute subsequent steps when the electronic device has established a communication connection with the character input device, thereby preventing the problem of the automated test program continuing to execute when the electronic device is not connected to the character input device.
[0065] Step 406: When the electronic device and the character input device have established a communication connection, the characters to be input are converted into symbols recognizable by the character input device, and the symbols recognizable by the character input device are sent to the character input device.
[0066] Specifically, when it is determined that a communication connection has been established between the electronic device and the character input device, a character conversion program in the automated test script is run, and the character conversion program is used to convert characters to be input. The program is provided with a correspondence between characters to be input and symbols recognizable by the character input device. The electronic device responds to the character conversion program, and according to the correspondence between characters to be input and symbols recognizable by the character input device, converts the characters to be input into symbols recognizable by the character input device, and sends the converted symbols recognizable by the character input device to the character input device.
[0067] For example, the character to be input is A, and the symbol corresponding to the character to be input and recognizable by the character input device is 0xA. Then, the electronic device responds to the character conversion program, converts A into 0xA, and sends the result to the character input device.
[0068] Step 408: The character input device inputs the recognizable symbol into the character input box on the display screen of the electronic device.
[0069] Specifically, the character input device inputs the recognizable symbol into the character input box on the display screen of the electronic device.
[0070] Step 410: Convert the symbols recognizable by the character input device into the characters to be input for display.
[0071] Specifically, the electronic device converts the symbols recognized by the character input device into the characters to be input according to the correspondence between the characters to be input and the symbols recognized by the character input device, and displays the characters to be input in a character input box, wherein the character input box may be a security control password input box.
[0072] In this embodiment, the electronic device converts the characters to be input into symbols recognizable by the character input device through a communication connection with the character input device. The character input device inputs the symbols recognizable by the character input device into the display screen of the electronic device, converts the symbols recognizable by the character input device into the characters to be input, and displays the input characters in the character input box. In the automated test, the electronic device can automatically input the characters to be input in the character input box by simulating input, which solves the problem of low automation level caused by the need for manual human input of characters in the input box in the automated test, and improves the efficiency of the automated test.
[0073] It should be noted that the character input method provided in the embodiment of the present application can be executed by a character input device or a control module in the character input device for executing the character input method. In the embodiment of the present application, the character input method executed by the character input device is taken as an example to illustrate the character input device provided in the embodiment of the present application.
[0074] Figure 5 Schematic diagram of the structure of a device for character input according to an embodiment of the present invention. Figure 5 As shown, the device 500 for character input includes: an acquisition module 510 , a conversion module 520 , an input module 530 , and a display module 540 .
[0075] The acquisition module 510 is used to acquire the characters to be input; the conversion module 520 is used to convert the characters to be input into corresponding target symbols based on the correspondence between the characters and the symbols recognizable by the character input device when it is detected that the electronic device has established a communication connection with the character input device; the input module 530 is used to send the target symbols to the character input device, and the character input device inputs the target symbols into the character input box on the display screen of the electronic device; the display module 540 is used to convert the target symbols into the characters to be input for display based on the correspondence.
[0076] In one implementation, the acquisition module 510 is used to execute a character input request instruction in an automated test script, respond to the character input request instruction, display the character input box, and acquire the character to be input.
[0077] In one implementation, the conversion module 520 is used to run a device detection program in an automated test script, respond to the device detection program, detect whether the electronic device has established a communication connection with the character input device, and obtain a detection result, and when the detection result indicates that the electronic device has established a communication connection with the character input device, determine that the electronic device has established a communication connection with the character input device.
[0078] In one implementation, the conversion module 520 is used to run a character conversion program in an automated test script, wherein the character conversion program is provided with the corresponding relationship, and in response to the character conversion program, the to-be-input character is converted into the target symbol.
[0079] In one implementation, the conversion module 520 is used to run a character conversion program in an automated test script, wherein the character conversion program is provided with the corresponding relationship, and in response to the character conversion program, the to-be-input character is converted into the target symbol.
[0080] The device for character input in the embodiment of the present application can be a device, or a component, integrated circuit, or chip in a terminal. The device can be a mobile electronic device or a non-mobile electronic device. Exemplarily, the mobile electronic device can be a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle electronic device, a wearable device, an ultra-mobile personal computer (ultra-mobile personal computer, UMPC), a netbook or a personal digital assistant (personal digital assistant, PDA), etc., and the non-mobile electronic device can be a server, a network attached storage (Network Attached Storage, NAS), a personal computer (personal computer, PC), a television (television, TV), a teller machine or a self-service machine, etc., which is not specifically limited in the embodiment of the present application.
[0081] The character input device in the embodiment of the present application may be a device having an operating system. The operating system may be an Android operating system, an iOS operating system, or other possible operating systems, which are not specifically limited in the embodiment of the present application.
[0082] The character input device provided in the embodiment of the present application can realize Figures 1 to 4 To avoid repetition, the various processes implemented in the method embodiment are not described here.
[0083] Optional, such as Figure 6 As shown, an embodiment of the present application also provides an electronic device 600, including a processor 601, a memory 602, and a program or instruction stored in the memory 602 and executable on the processor 601. When the program or instruction is executed by the processor 601, each process of the above-mentioned character input method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0084] It should be noted that the electronic devices in the embodiments of the present application include the mobile electronic devices and non-mobile electronic devices mentioned above.
[0085] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of the present application.
[0086] The electronic device 700 includes but is not limited to: a radio frequency unit 701, a network module 702, an audio output unit 703, an input unit 704, a sensor 705, a display unit 706, a user input unit 707, an interface unit 708, a memory 709, and a processor 710.
[0087] Those skilled in the art will appreciate that the electronic device 700 may also include a power source (such as a battery) for supplying power to each component, and the power source may be logically connected to the processor 710 through a power management system, so that the power management system can manage charging, discharging, and power consumption management. The electronic device structure shown in the figure does not constitute a limitation on the electronic device, and the electronic device may include more or fewer components than shown in the figure, or combine certain components, or arrange components differently, which will not be described in detail here.
[0088] Processor 710 is used to obtain a character to be input, and when it is detected that a communication connection is established between the electronic device and the character input device, based on the correspondence between the character and the symbol recognizable by the character input device, convert the character to be input into a corresponding target symbol, send the target symbol to the character input device, and the character input device inputs the target symbol into a character input box on the display screen of the electronic device, and based on the correspondence, converts the target symbol into the character to be input for display.
[0089] In one implementation, the processor 710 is configured to execute a character input request instruction in an automated test script, respond to the character input request instruction, display the character input box, and obtain the character to be input.
[0090] In one implementation, the processor 710 is used to run a device detection program in an automated test script, respond to the device detection program, detect whether the electronic device has established a communication connection with the character input device, and obtain a detection result, and when the detection result indicates that the electronic device has established a communication connection with the character input device, determine that the electronic device has established a communication connection with the character input device.
[0091] In one implementation, the processor 710 is configured to run a character conversion program in an automated test script, wherein the character conversion program is provided with the corresponding relationship, and in response to the character conversion program, the to-be-input character is converted into the target symbol.
[0092] This embodiment can implement each process of the above-mentioned character input method embodiment and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0093] It should be understood that in the embodiment of the present application, the input unit 704 may include a graphics processor (Graphics Processing Unit, GPU) 7041 and a microphone 7042, and the graphics processor 7041 processes the image data of the static picture or video obtained by the image capture device (such as a camera) in the video capture mode or the image capture mode. The display unit 706 may include a display panel 7061, and the display panel 7061 may be configured in the form of a liquid crystal display, an organic light emitting diode, etc. The user input unit 707 includes a touch panel 7071 and other input devices 7072. The touch panel 7071 is also called a touch screen. The touch panel 7071 may include two parts: a touch detection device and a touch controller. Other input devices 7072 may include but are not limited to a physical keyboard, a function key (such as a volume control button, a switch button, etc.), a trackball, a mouse, and a joystick, which will not be repeated here. The memory 709 can be used to store software programs and various data, including but not limited to applications and operating systems. The processor 710 can integrate an application processor and a modem processor, wherein the application processor mainly processes an operating system, a user interface, and applications, etc., and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 710.
[0094] An embodiment of the present application also provides a readable storage medium, on which a program or instruction is stored. When the program or instruction is executed by a processor, each process of the above-mentioned character input method embodiment is implemented, and the same technical effect can be achieved. To avoid repetition, it will not be repeated here.
[0095] The processor is a processor in the electronic device described in the above embodiment. The readable storage medium includes a computer readable storage medium, such as a computer read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0096] It should be noted that, in this article, the terms "comprise", "include" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise one..." do not exclude the presence of other identical elements in the process, method, article or device including the element. In addition, it should be pointed out that the scope of the methods and devices in the embodiments of the present application is not limited to performing functions in the order shown or discussed, and may also include performing functions in a substantially simultaneous manner or in reverse order according to the functions involved, for example, the described method may be performed in an order different from that described, and various steps may also be added, omitted, or combined. In addition, the features described with reference to certain examples may be combined in other examples.
[0097] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present application, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, a magnetic disk, or an optical disk), and includes a number of instructions for a terminal (which can be a mobile phone, a computer, a server, an air conditioner, or a network device, etc.) to execute the methods described in each embodiment of the present application.
[0098] The embodiments of the present application are described above in conjunction with the accompanying drawings, but the present application is not limited to the above-mentioned specific implementation methods. The above-mentioned specific implementation methods are merely illustrative and not restrictive. Under the guidance of the present application, ordinary technicians in this field can also make many forms without departing from the purpose of the present application and the scope of protection of the claims, all of which are within the protection of the present application.
Claims
1. A method for character input, It is characterized in that include: Get the characters to be input; In the case of detecting that the electronic device has established a communication connection with the character input device, based on the correspondence between the character and the symbol recognizable by the character input device, converting the character to be input into the corresponding target symbol; Sending the target symbol to the character input device, and having the character input device input the target symbol into a character input box on the display screen of the electronic device; Based on the corresponding relationship, convert the target symbol into the character to be input for display; The step of obtaining the characters to be input includes: Run the character input request instructions in the automated test script; In response to the character input request instruction, display the character input box and obtain the character to be input; The step of detecting that the electronic device establishes a communication connection with the character input device comprises: Run the device detection program in the automated test script; In response to the device detection program, detecting whether the electronic device has established a communication connection with the character input device, and obtaining a detection result; When the detection result indicates that the electronic device has established a communication connection with the character input device, determining that the electronic device has established a communication connection with the character input device; If the communication connection with the character input device is not established, an abnormal message will be reported; The step of converting the character to be input into the corresponding target symbol based on the correspondence between the character and the symbol recognizable by the character input device includes: Running a character conversion program in an automated test script, wherein the character conversion program is provided with the corresponding relationship; In response to the character conversion program, the to-be-input character is converted into the target symbol.
2. A device for character input, It is characterized in that include: An acquisition module is used to acquire characters to be input; A conversion module, configured to convert the character to be input into a corresponding target symbol based on a correspondence between the character and a symbol recognizable by the character input device when it is detected that the electronic device has established a communication connection with the character input device; An input module, used for sending the target symbol to the character input device, so that the character input device inputs the target symbol into a character input box on the display screen of the electronic device; A display module, configured to convert the target symbol into the character to be input for display based on the corresponding relationship; Wherein, the acquisition module is used for: Run the character input request instructions in the automated test script; In response to the character input request instruction, display the character input box and obtain the character to be input; The conversion module is used for: Run the device detection program in the automated test script; In response to the device detection program, detecting whether the electronic device has established a communication connection with the character input device, and obtaining a detection result; When the detection result indicates that the electronic device has established a communication connection with the character input device, determining that the electronic device has established a communication connection with the character input device; If the communication connection with the character input device is not established, an abnormal message will be reported; The conversion module is used for: Running a character conversion program in an automated test script, wherein the character conversion program is provided with the corresponding relationship; In response to the character conversion program, the to-be-input character is converted into the target symbol.
3. An electronic device, It is characterized in that The method comprises a processor, a memory and a program or instruction stored in the memory and executable on the processor, wherein the steps of the character input method as claimed in claim 1 are implemented when the program or instruction is executed by the processor.
4. A readable storage medium, It is characterized in that The readable storage medium stores a program or instruction, and when the program or instruction is executed by a processor, the steps of the character input method as claimed in claim 1 are implemented.
