Mobile device environment setting method

By using a computer device to receive target parameter data and automatically determine the page and target object location in mobile device testing, the time-consuming and labor-consuming problem of manually searching and confirming target objects is solved, and automated testing is realized, saving manpower and time.

CN119512829APending Publication Date: 2025-02-25HUANDA COMPUTER (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311009046.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-08-11
Publication Date
2025-02-25

AI Technical Summary

Technical Problem

In the prior art, testing of mobile devices requires manual search and confirmation of target objects on target pages, which is time-consuming and labor-intensive, especially when testing a large number of devices.

Method used

Through a mobile device environment setting method, the computer device receives target parameter data, automatically determines whether the current page is a target page, and obtains the position coordinates of the target object through markup language data, so as to realize automatic page search and target object identification.

Benefits of technology

This greatly saves the manpower and time required by the tester to manually set up the mobile device, and improves the testing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119512829A_ABST
    Figure CN119512829A_ABST
Patent Text Reader

Abstract

The invention discloses a mobile device environment setting method. A computer device executes the following steps: receiving a plurality of target reference parameters related to a target object; obtaining page data of a current page from a mobile device; when it is determined that the current page is a target page according to the page data and a target reference parameter associated with a page guide name, the mobile device captures object data of the target page according to the target reference parameter associated with a page information type and converts the object data into marked language data; determining target object data containing the target reference parameters from the obtained markup language data; and obtaining the position coordinates of the target object according to the position data contained in the target object data, so that the mobile device can perform subsequent operation related to the target object according to the position coordinates.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to environment setting, and more particularly to a method for setting the environment of a mobile device. Background Art

[0002] For mobile devices (such as smart phones, tablets, etc.) installed with the Android operating system, before leaving the factory, the Android operating system installed therein must pass the tests of multiple different test suites (such as CTS, GTS, VTS, etc.) provided by Google, and can only be sold after obtaining Google's certification. In the testing of such mobile devices, it is often necessary to manually operate the mobile device to search and confirm the target object (such as an application) on the target page. Specifically, the tester must find the target page by sliding or scrolling the display page of the mobile device with a finger, and then manually identify and confirm the target object on the target page, or even manually click to select or start the target object. In this way, especially when testing a large number of mobile devices, the tester is both time-consuming and laborious in searching the target page and confirming the target object.

[0003] Therefore, for a mobile device, how to invent an environment setting method capable of automatic page search and target object recognition has become one of the issues to be solved in the relevant technical field. Summary of the invention

[0004] Therefore, an object of the present invention is to provide a method for setting a mobile device environment, which can overcome at least one disadvantage of the prior art.

[0005] Therefore, a mobile device environment setting method provided by the present invention is used to set a mobile device to display a target object located on a target page, which is executed by a computer device and includes the following steps: (A) receiving target parameter data related to the target object, wherein the target parameter data includes multiple target reference parameters associated with at least a page information type of the page where the target object is located, multiple keywords related to the target object, and a page guide name related to the target page; (B) obtaining page data from the mobile device and corresponding to a current page of the mobile device; (C) determining whether the current page is the target page based on the page data and one or more of the target reference parameters associated with the page guide name; (D) when determining that the current page is the target page, determining whether the current page is the target page based on the target reference parameters associated with the page guide name. The invention relates to a method for controlling a mobile device to capture object data of a target page and convert the object data into markup language data, wherein the markup language data includes a plurality of object data parts corresponding to a plurality of objects and each object data part includes a plurality of reference parameters related to a corresponding object among the objects and corresponding to the target reference parameters, and position data of the corresponding object relative to a region of the target page; (E) obtaining the markup language data from the mobile device; (F) determining an object data part containing the target reference parameters from the markup language data as target object data; and (G) obtaining the position coordinates of the target object relative to the target page based on the position data contained in the target object data, so that the mobile device can perform subsequent operations related to the target object based on the position coordinates.

[0006] In some embodiments, in step (A), the target reference parameters include a page information parameter indicating the page information type, one or more name parameters indicating the page guide name, and a plurality of keyword parameters respectively indicating the keywords.

[0007] In some embodiments, in step (A), the target reference parameters are further associated with a tag representing the target object, and the target reference parameters further include a tag parameter indicating the tag.

[0008] In some embodiments, in step (C), the computer device determines whether the current page is the target page by determining whether the name parameter(s) match the page data. When the computer device determines that the name parameter(s) match the page data, the computer device determines that the current page is the target page.

[0009] In some embodiments, the following steps are also included between step (C) and step (D): (H) when it is determined that the current page is not the target page, notify the mobile device to change to another page as the current page; and repeat steps (B), (C), and (H) until the computer device determines that the current page is the target page.

[0010] Compared with the prior art, the mobile device environment setting method of the present invention can automatically set the mobile device to display the target object according to the received target parameter data, and can even set multiple identical mobile devices at the same time so that each mobile device displays the target object, thereby replacing the manual search and confirmation of the target object one by one. Especially when applied to the testing stage of a large number of mobile devices, it can greatly save the manpower and time required for the tester to manually set the mobile device. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Other features and effects of the present invention will be clearly presented in the embodiments with reference to the accompanying drawings, in which:

[0012] Figure 1 is a block diagram exemplarily illustrating a computer device and a mobile device used in a mobile device environment setting method according to an embodiment of the present invention; and

[0013] Figure 2 is a flow chart that exemplarily illustrates how the computer device in the embodiment configures the mobile device to display a target object. DETAILED DESCRIPTION

[0014] Before the present invention is described in detail, it should be noted that similar elements are denoted by the same reference numerals in the following description.

[0015] See also Figure 1 and Figure 2 A mobile device environment setting method according to an embodiment of the present invention is used to set a mobile device 1 (such as but not limited to a smart phone) to display a target object located on a target page, and is executed by a computer device 2, and includes the following steps S201-S211. It is worth noting that the mobile device environment setting method can be applied to set the test environment of one or more tested mobile devices before testing functions such as GPS, WIFI, camera, etc.

[0016] First, in step S201, the computer device 2 receives target parameter data related to the target object. In the present embodiment, the target parameter data includes a plurality of target reference parameters associated with the page information type of the page where the target object is located, a plurality of keywords related to the target object, a page guide name related to the target page, and a tag representing the target object. More specifically, the target reference parameters include a page information parameter indicating the page information type, one or more name parameters indicating the page guide name, a plurality of keyword parameters indicating the keywords respectively, and a tag parameter indicating the tag. In the present embodiment, the target reference parameters include, for example, two name parameters, which respectively indicate the Activity name corresponding to the target page and the Fragment name corresponding to the target page. However, in other embodiments, the target reference parameters may also include only one name parameter indicating the Activity name of the target page. Below, referring to Table 1, the various page information types covered by the page information parameters will be further illustrated.

[0017]

[0018] Table 1

[0019] For example, the target parameter data received by the computer device 2 may include parameter contents as shown in Table 2:

[0020] Target reference parameters Parameter content Page information parameters 1 Tag Parameters 0 First keyword argument Erase all data (factory reset) Second keyword argument android:id / title First name parameter com.android.settings / .SubSettings Second name parameter ResetDashboardFragment

[0021] Table 2

[0022] It is worth mentioning that, in other embodiments, the target parameter data may also include a test parameter indicating whether the target object needs to be tested, which may be, for example, "1" or "0". If the test parameter is "1", it means that the target object needs to be tested (the target parameter data will be used for test environment setting); if the test parameter is "0", it means that the target object does not need to be tested (the target parameter data will not be used for test environment setting).

[0023] Next, in step S202 , the computer device 2 sends a page data request related to a current page of the mobile device 1 to the mobile device 1 , for example by executing an ADB (Android Debug Bridge) command.

[0024] Afterwards, in step S203 , the mobile device 1 responds to the page data request and transmits the page data of the current page to the computer device 2 . Thus, the computer device obtains the page data from the mobile device 1 .

[0025] Then, in step S204, the computer device 2 determines whether the current page is the target page according to the page data and the name parameters in the target reference parameters. More specifically, the computer device 2 determines whether the current page is the target page by determining whether the name parameters match the page data. If the determination result is positive, the process will proceed to step S207; otherwise, the process will proceed to step S205.

[0026] When the computer device 2 determines that the current page is not the target page, in step S205, the computer device 2 sends a page change request to the mobile device 1. Then, the mobile device 1 responds to the page change request from the computer device 2 and changes another page as the current page (step S206). Then, the process returns to step S202, so that the computer device 2 and the mobile device 1 repeat steps S202 to S206 until the computer device 2 determines that the current page is the target page.

[0027] When the computer device 2 determines that the current page is the target page, in step S207 , the computer device 2 sends an object data request related to the target page to the mobile device 1 according to the page information parameters included in the target reference parameters.

[0028] Next, in step S208, the mobile device 1 captures the object data of the target page in response to the received object data request and converts the object data into markup language data. More specifically, the mobile device 1 uses, for example, an adb shell uiautomatordump command to convert the object data of the target page, such as a ui hierarchy message, into the markup language data having, for example, an XML format. The markup language data includes a plurality of object data portions corresponding to a plurality of objects, and each object data portion includes a plurality of reference parameters related to a corresponding object of the objects and corresponding to the target reference parameters, as well as location data of the corresponding object relative to a location area of ​​the target page. For example, the following Table 3 exemplifies part of the content contained in the markup language data, which has, for example, 4 object data portions corresponding to 4 objects contained in the target page.

[0029]

[0030]

[0031] Table 3

[0032] It is worth noting that in this embodiment, the mobile device 1 further stores the markup language data in XML format in a predetermined location of a storage medium (e.g., SD card, not shown) contained in the mobile device 1 in the form of a file named, for example, “capture_view.xml”.

[0033] Then, in step S209, the computer device 2 obtains the markup language data from the mobile device 1. More specifically, in this embodiment, the computer device 2 obtains the markup language data by sending a predetermined command related to file reading to the mobile device 1, such as an adb shell cat / sdcard / capture_view.xml command, so as to read a file such as "capture_view.xml" from a predetermined location of the storage medium.

[0034] However, it is worth noting that in other embodiments, the mobile device 1 may also directly transmit the markup language data to the computer device 2 in step S208 , so that the computer device 2 receives the markup language data from the mobile device in step S209 .

[0035] Then, in step S210, the computer device 2 determines an object data portion containing the keyword parameters and the tag parameters in the target reference parameters from the markup language data as the target object data. For example, the computer device 2 can determine the target object data from the markup language data shown in Table 3, for example, based on the parameter contents corresponding to the first keyword parameter, the second keyword parameter, and the tag parameter contained in Table 2, i.e., "Erase all data (factory reset)", "android:id / title", and "0", as shown in Table 4 below:

[0036]

[0037] Table 4

[0038] More specifically, "text="Erase all data(factory reset)"" contained in the above Table 4 matches the parameter content corresponding to the first keyword parameter in the above Table 2, "resource-id="android:id / title" contained in the above Table 4 matches the parameter content corresponding to the second keyword parameter in the above Table 2, and "index="0"" contained in the above Table 4 matches the parameter content corresponding to the tag parameter in the above Table 2.

[0039] Finally, in step S211, the computer device 2 obtains the position coordinates of the target object relative to the target page according to the position data contained in the target object data, so that the mobile device 1 can perform subsequent operations related to the target object according to the position coordinates, such as testing the function of the target object. For example, "bounds="[144,406][543,449]"" contained in Table 4 above represents the range of the target object displayed in the mobile device 1 (screen) and serves as the position data of the target object.

[0040] Incidentally, when in use, the computer device 2 can also receive multiple consecutive target parameter data corresponding to, for example, multiple objects to be tested, and use the mobile device environment setting method of the present invention to automatically and in accordance with the order of those target parameter data, set the environment of the mobile device according to each target parameter data to facilitate subsequent related tests.

[0041] In summary, the computer device 2 can automatically set the mobile device 1 to display the target object according to the received target parameter data, and even set multiple identical mobile devices 1 at the same time, so that each mobile device 1 displays the target object, thereby replacing the manual search and confirmation of the target object one by one, especially when applied to the testing stage of a large number of mobile devices, it can greatly save the manpower and time required for the tester to manually set the mobile device. Therefore, the mobile device environment setting method of the present invention can indeed achieve the purpose of the present invention.

[0042] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.

Claims

1. A method for setting a mobile device environment, for setting a mobile device to display a target object located on a target page, executed by a computer device, characterized in that: And includes the following steps: (A) receiving target parameter data related to the target object, wherein the target parameter data includes a plurality of target reference parameters associated with at least a page information type of a page where the target object is located, a plurality of keywords related to the target object, and a page navigation name related to the target page; (B) obtaining page data corresponding to a current page of the mobile device from the mobile device; (C) determining whether the current page is the target page based on the page data and one or more of the target reference parameters associated with the page navigation name; (D) when determining that the current page is the target page, according to one of the target reference parameters associated with the page information type, causing the mobile device to retrieve object data of the target page and convert the object data into markup language data, wherein the markup language data includes a plurality of object data parts corresponding to a plurality of objects respectively and each object data part includes a plurality of reference parameters related to a corresponding one of the objects and corresponding to the target reference parameters, and location data of the corresponding object relative to a location area of ​​the target page; (E) obtaining the markup language data from the mobile device; (F) determining, from the markup language data, an object data portion containing the target reference parameters as target object data; and (G) obtaining the position coordinates of the target object relative to the target page based on the position data contained in the target object data, so that the mobile device can perform subsequent operations related to the target object based on the position coordinates.

2. The method for setting a mobile device environment according to claim 1, wherein: In step (A), the target reference parameters include a page information parameter indicating the page information type, one or more name parameters indicating the page navigation name, and a plurality of keyword parameters indicating the keywords respectively.

3. The method for setting a mobile device environment according to claim 2, wherein: In step (A): The target reference parameters are also associated with a tag representing the target object; and The target reference parameters further include a tag parameter indicating the tag.

4. The method for setting a mobile device environment according to claim 2, wherein: In step (C), the computer device determines whether the current page is the target page by determining whether the name parameter(s) matches the page data; and When the computer device determines that the name parameter(s) match the page data, the computer device determines that the current page is the target page.

5. The method for setting a mobile device environment according to any one of claims 1 to 4, characterized in that: The following steps are also included between step (C) and step (D): (H) when it is determined that the current page is not the target page, instructing the mobile device to change another page as the current page; and Steps (B), (C), and (H) are repeatedly executed until the computer device determines that the current page is the target page.