CN106681973A - Method and device for achieving automatically filling browser sheet in test - Google Patents

Method and device for achieving automatically filling browser sheet in test Download PDF

Info

Publication number
CN106681973A
CN106681973A CN201611187682.7A CN201611187682A CN106681973A CN 106681973 A CN106681973 A CN 106681973A CN 201611187682 A CN201611187682 A CN 201611187682A CN 106681973 A CN106681973 A CN 106681973A
Authority
CN
China
Prior art keywords
type
form item
browser
filled
user
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN201611187682.7A
Other languages
Chinese (zh)
Other versions
CN106681973B (en
Inventor
梁美英
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Qihoo Technology Co Ltd
Original Assignee
Beijing Qihoo Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Qihoo Technology Co Ltd filed Critical Beijing Qihoo Technology Co Ltd
Priority to CN201611187682.7A priority Critical patent/CN106681973B/en
Publication of CN106681973A publication Critical patent/CN106681973A/en
Application granted granted Critical
Publication of CN106681973B publication Critical patent/CN106681973B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F40/00Handling natural language data
    • G06F40/10Text processing
    • G06F40/166Editing, e.g. inserting or deleting
    • G06F40/174Form filling; Merging
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management

Abstract

The invention discloses a method and device for achieving automatically filling a browser sheet in a test. The method comprises the steps of in the test process of an application, judging whether user preset information exists or not in the browser sheet to be filled, and determining the types of all sheet items in the browser sheet; if the user preset information exists, adopting the user preset information as test data to fill the sheet items matched with the type according to the type of the user preset information and the types of all the sheet items in the browser sheet; if unfilled sheet items still exist in the browser sheet, generating the test data with the corresponding types according to the types of all the sheet items to conduct filling. As can be seen, according to the method and device for achieving automatically filling browser sheet in the test, a user presets filling information as the test data, thus the automatic filling function can be achieved for all the browser sheets of a website opened in a browser, the complex operation of manual filling is saved, and the user experience is strengthened.

Description

A kind of method and apparatus that filling browser list automatically is realized in test
Technical field
The present invention relates to field of computer technology, and in particular to the side of filling browser list automatically is realized in a kind of test Method and device.
Background technology
In computer realm, user during particularly user is tested, is needed in browser use is carried out Fill in manually browser list carry out webpage log in, log-on message or construction business datum test etc., manually operate numerous It is trivial, affect Consumer's Experience.In the test of prior art, although can partly realize the function of browser Auto Filling Forms, But the pattern of recording and playback is all based on, that is, records current reference address, the data that static preservation is manually filled in, when again During secondary access network address, the artificial data for preserving of playback are filled automatically, and this kind of filling data are unable to dynamic change, just for Identical access network address just effectively, is still needed when user accesses other network address hand-stuff, it is impossible to realize that the browser is opened All websites browser list automatic filling, reduce Consumer's Experience.
The content of the invention
In view of the above problems, it is proposed that the present invention so as to provide one kind overcome the problems referred to above or at least in part solve on The method and corresponding device of filling browser list automatically are realized in stating the test of problem.
According to one aspect of the present invention, there is provided a kind of method that filling browser list automatically is realized in test, its In, the method includes:
In using test process, for browser list to be filled, user preset information is judged whether, and Determine the type of each form item in browser list;
If there is user preset information, then according to each form item in the type and browser list of user preset information Type, user preset information is filled in the form item of type matching as test data;
If also there is unfilled form item in browser list, respective type is generated according to the type of each form item Test data be filled.
Alternatively, the method is further included:
If the unknown form item of present pattern is gone back in browser list, retouched according to the attribute of the unknown form item of type State information and generate the test data that matches and be filled.
Alternatively, the attribute description information of the form item includes:The regular expression of form item;
The attribute description information of the form item unknown according to type generates the test data for matching and is filled bag Include:It is filled according to the test data that the generation of the regular expression of type unknown form item meets regular expression.
Alternatively, the attribute description information of the form item includes:The mark and/or title of form item;
The attribute description information of the form item unknown according to type generates the test data for matching and is filled bag Include:The survey of the word implication for meeting the mark and/or title is generated according to the mark and/or title of the unknown form item of type Examination data are filled.
Alternatively, the method is further included:
User preset information configuration control is provided on browser page;
When the user preset information configuration control is triggered, user preset information configuration interface is exported, for user input User preset information;The corresponding different type of each input item at wherein user preset information configuration interface;
Will be the input content in each input item on user preset information configuration interface corresponding with the type of corresponding input item Preserve, obtain user preset information.
Alternatively, the method is further included:User preset information is bound with the URL that user specifies;
For browser list to be filled, judge whether that user preset information includes:Judge whether to be tied up The user preset information that fixed URL is matched with the URL of the browser list to be filled, be determine it is clear for be filled Look at device list, there is user preset information.
Alternatively, the type of each form item in the determination browser list includes:
By the control identification function of browser, the type of the corresponding control of each form item in identification browser list.
Alternatively, the method is further included:
The form item unknown for the type in browser list, according to being finally filled in the form item, content study should The type of form item, and recorded in form item type learning table;
Wherein, the test content being finally filled in the form item is the content or be randomly generated that user is manually filling And the content inserted.
Alternatively, the type of each form item in the determination browser list also includes:
The type of each form item in browser list is determined according to form item type learning table.
According to a further aspect in the invention, there is provided in a kind of test, realize the device of automatically filling browser list, its In, the device includes:
Pretreatment unit, is suitable in using test process, for browser list to be filled, judges whether to use The type of each form item in family presupposed information, and determination browser list;
Filling processing unit, is suitable to when there is user preset information, according to the type and browser of user preset information The type of each form item in list, user preset information is filled in the form item of type matching as test data;Such as Also there is unfilled form item in fruit browser list, then the test data of respective type is generated according to the type of each form item It is filled.
Alternatively, the filling processing unit, if the unknown table of present pattern is gone back in being further adapted for browser list Individual event, then generate the test data for matching and be filled according to the attribute description information of the unknown form item of type.
Alternatively, the attribute description information of the form item includes:The regular expression of form item;
The filling processing unit, is suitable to meet regular expressions according to the generation of the regular expression of type unknown form item The test data of formula is filled.
Alternatively, the attribute description information of the form item includes:The mark and/or title of form item;
The filling processing unit, is suitable to according to the mark and/or title of the unknown form item of type are generated and met The test data of the word implication of mark and/or title is filled.
Alternatively, the device is further included:
User preset information process unit, is suitable to user preset information configuration control is provided on browser page;When this When user preset information configuration control is triggered, user preset information configuration interface is exported, for user input user preset information; The corresponding different type of each input item at wherein user preset information configuration interface;Will be each on user preset information configuration interface Input content in input item is corresponding with the type of corresponding input item to be preserved, and obtains user preset information.
Alternatively, user preset information process unit, is suitable to user preset information is tied up with the URL that user specifies It is fixed;
The pretreatment unit, is suitable to judge whether bound URL and the browser list to be filled The user preset information of URL matchings, is to determine for browser list to be filled, there is user preset information.
Alternatively, the pretreatment unit, is suitable to the control identification function by browser, in identification browser list The type of the corresponding control of each form item.
Alternatively, the device is further included:
Type learning unit, is suitable to the form item unknown for the type in browser list, according to being finally filled into this In form item, content learns the type of the form item, and recorded in form item type learning table;
Wherein, the test content being finally filled in the form item is the content or be randomly generated that user is manually filling And the content inserted.
Alternatively, the pretreatment unit, is further adapted for being determined according to form item type learning table each in browser list The type of form item.
Technology according to the present invention scheme, in using test process, user can be clear at this by plug-in unit in browser Look at the information that filling automatically is preset in device, when the user test browser, for browser list to be filled, judge whether There is the type of each form item in user preset information, and determination browser list;If there is user preset information, then According to the type of each form item in the type and browser list of user preset information, user preset information is filled into into type In the form item of matching;If also there is unfilled form item in browser list, generated according to the type of each form item The data of respective type are filled.In sum, the present invention improves the pattern of recording and playback in the test of prior art, passes through Used as test data, the browser list of the network address opened to the browser is capable of achieving to fill automatically user preset filling information Function, save hand-stuff troublesome operation, strengthen the experience of user.
Described above is only the general introduction of technical solution of the present invention, in order to better understand the technological means of the present invention, And can be practiced according to the content of description, and in order to allow the above and other objects of the present invention, feature and advantage can Become apparent, below especially exemplified by the specific embodiment of the present invention.
Description of the drawings
By the detailed description for reading hereafter preferred implementation, various other advantages and benefit are common for this area Technical staff will be clear from understanding.Accompanying drawing is only used for the purpose for illustrating preferred implementation, and is not considered as to the present invention Restriction.And in whole accompanying drawing, it is denoted by the same reference numerals identical part.In the accompanying drawings:
Fig. 1 shows a kind of flow process of method for realizing filling automatically browser list according to an embodiment of the invention Figure;
Fig. 2 shows a kind of signal of device for realizing filling automatically browser list according to an embodiment of the invention Figure;
Fig. 3 shows a kind of showing for device for realizing filling automatically browser list in accordance with another embodiment of the present invention It is intended to.
Specific embodiment
The exemplary embodiment of the disclosure is more fully described below with reference to accompanying drawings.Although the disclosure is shown in accompanying drawing Exemplary embodiment, it being understood, however, that may be realized in various forms the disclosure and should not be by embodiments set forth here Limited.On the contrary, there is provided these embodiments are able to be best understood from the disclosure, and can be by the scope of the present disclosure Complete conveys to those skilled in the art.
Fig. 1 realizes filling browser list automatically method in showing a kind of test according to an embodiment of the invention Flow chart.As shown in figure 1, the method includes:
Step S110, in using test process, for browser list to be filled, judges whether user preset The type of each form item in information, and determination browser list.
Browser list in this step, just refers in using test process, when user uses browser, in browser In filling frame when being filled information because being the filling form for being formed in a browser, go out in the case of browser is opened Existing filling form is known as browser list.For example, user needs to log in a certain website by user name, password, identifying code When, the form that user enters row information filling on log-in interface is exactly browser list;Or user is carrying out certain website account Long form when essential information is filled, also referred to as browser list are carried out during registration.
If not filling automatically function, need user to carry out hand-stuff, for the short list of browser, need filling Content it is less, the negative emotions of user will not be caused;But for the long list of browser, such as quantity of information filled when registering It is larger, Consumer's Experience will be substantially reduced by hand-stuff.
In this step, user can presupposed information in a browser, when user uses browser, it is possible to by user Default information is automatically filled in browser list to be filled.It is being filled to browser list to be filled Before, it is first determined whether the user preset information of the browser list to be filled is existed for, if it exists, can be preferential Select the information with the type matching of each form item in browser list to insert this to be filled to browse from presupposed information In device list.
Include in the list of user preset information:The name of form item, the data type of each form item of correspondence, matching word The contents such as symbol string, user preset information, user can enter the default of row information, example by the name of the form item of the presupposed information Such as, the name of form item can be user name, password, phone number, ID (identity number) card No., mailbox, address etc..
Here the data type of corresponding each form item can be:Password, password domain are similar with text box, but are input into Content show round dot;Radio, such as radio button, man or female;Checkbox, check box;file:Domain is uploaded (depending on difficulty or ease journey Degree solves this type);Color, defines palette;Tel, defines the input domain of telephone number;Email, defines the input of email Domain;Url, input domain of the definition comprising URl addresses;Search, defines region of search;Number, input domain of the definition comprising numerical value; Range, input of the definition comprising digital value in certain limit;Date, definition choose day, the moon, the input domain in year;Month, definition Choose the moon, the input domain in year;Week, definition choose week, the input domain in year;Time, definition choose when, the input domain of second; Datetime, defines access time, life, the input domain in year (UTC time);Datatime-local, defines access time, day The moon, the input domain (local zone time) in year.
If it should be noted that in the list of presupposed information, user does not carry out pre- to classified informations such as phone numbers If can then randomly generate the information corresponding with the data type of form item, for example, user does not carry out pre- to phone number If then randomly generating with the 11 of 1 beginning as significant digits.Meanwhile, user can also be made by oneself by the list of presupposed information Adopted information it is default, and user can also carry out top set operation, then can priority treatment User Defined presupposed information.
In order to ensure the correctness of the information being automatically filled in list to be filled, also need to when filling automatically really The type of each form item in fixed browser list to be filled, the only presupposed information of type matching just can be filled out automatically Fill.
Step S120, if there is user preset information, then according in the type and browser list of user preset information Each form item type, user preset information is filled in the form item of type matching as test data.
As the test data in browser list, but can there is user in judging browser in the presupposed information of user After presupposed information, in addition it is also necessary to judge the type and the class that there is presupposed information of each form item of list in browser to be filled Whether type matches, and in the case that only both match, just can be filled automatically.For example, a certain browser to be filled Have the form item of " telephone number " in list, its type is the input domain of telephone number, if in user preset information, have with The presupposed information type that " telephone number " form item matches is somebody's turn to do, is then filled automatically;If not with " telephone number " list The presupposed information type that item matches, then can not be filled automatically.
Step S130, if also there is unfilled form item in browser list, gives birth to according to the type of each form item Test data into respective type is filled.
If also there is the unmatched form item of type with presupposed information in browser list, it is not filled automatically, Then matched test data can be generated at random according to the type of unfilled each form item to be filled at random.Because For test process, some information inserted in browser list are not necessarily really, as long as data form is correct .For example, random generation here can be:(1) generate phone number:First is 1;Second is 3/4/5/7/8 Any one position;The 9 next random numerals for generating 0-9.(2) generate ID (identity number) card No. (ABCDEFYYYYMMDDXXXR): Six bit digital address codes;Eight-digit number word date of birth code;Three bit digital sequence codes;One-bit digital check code.(3) generate mailbox: It is random to generate user name;User name+random mailbox Suffix array clustering.(4) url is generated at random:http:Www+ small letter random strings + random domain name.
If random filling is correct, user directly can determine, if filling is incorrect, user can cancel to be carried out again Generate at random, or user is directly manually filling correct data.
It can be seen that, in the test for improving prior art of the invention, the pattern of recording and playback, is made by user preset filling information For test data, the browser list of the network address opened to the browser is capable of achieving the function of filling automatically, saves and manually fills out The troublesome operation filled, strengthens the experience of user.
Browser list to be filled is each in browser list through filling automatically and generating at random data filling In the case of the type of form item is known, if the unknown form item of present pattern is gone back in browser list to be filled, In one embodiment of the present of invention, the method shown in Fig. 1 is further included:If it is unknown to go back present pattern in browser list Form item, then generate the test data for matching and be filled according to the attribute description information of the unknown form item of type.Here Attribute description information can be:The mark and/or title of the regular expression and form item of form item.Wherein, canonical table Up to formula, also known as regular expression, regular expression is usually used to retrieval, replaces those texts for meeting certain pattern (rule) This, can refer to the rule of the data inserted in form item here, according to this rule it is known that this is inserted in the form item Data mode.So, when the attribute description information of form item includes:
(1) regular expression of form item.
Then according to the attribute description information of the unknown form item of type generate the test data that matches be filled including: It is filled according to the test data that the generation of the regular expression of type unknown form item meets regular expression.Here can be with The data for meeting regular expression are generated by randexp.js according to date_type.For example, the regular expressions of a certain form item Formula is D1, then generation one is digital;If S1, then a character is generated;If S1-S9, then generate the word of nine characters Symbol string.
(2) mark and/or title of form item.
Then according to the attribute description information of the unknown form item of type generate the test data that matches be filled including: The test of the word implication for meeting the mark and/or title is generated according to the mark and/or title of the unknown form item of type Data are filled.That is analyze the mark such as title of the form item to be filled.For example, the title of form item is " postal Part ", then can insert the data of mail format in the form item.
The mark of form item here can be:User name (name);Password (password);Passport NO. cardcode;Mailbox email;Phone number mobileNO.;Age age;Company company etc..
In the present invention, user can carry out the automatic filling of the browser list in the browser with presupposed information, here user Row information can be entered by the presupposed information plug-in unit in browser to preset.In one embodiment of the invention, the side shown in Fig. 1 Method is further included:User preset information configuration control is provided on browser page, such as in " setting " option of browser In increase presupposed information configuration control;When the user preset information configuration control is triggered, for example user passes through right mouse button The configuration control is clicked on, then exports user preset information configuration interface, when user is clicked on accordingly in advance again by left mouse button If during a certain input frame in information configuration interface, for user input user preset information;Wherein user preset information configuration circle The corresponding different type of each input item in face;In order to can be with each list in browser list to be filled when automatically filling The type of item is matched, by the input content in each input item on user preset information configuration interface and corresponding input item Type correspondence is preserved simultaneously, obtains user preset information.
If the browser list that user is not intended to all websites in the browser can be carried out by presupposed information Automatically fill, or some presupposed informations specified need to be filled in the website that some are specified automatically, then user can be pre- If the setting of station address URL during information, is carried out to some presupposed informations or to all presupposed informations, then, further, Said method is further included:User preset information is bound with the URL that user specifies;For browser table to be filled It is single, judge whether that user preset information includes:Judge whether bound URL and the browser table to be filled The user preset information of single URL matchings, is to determine for browser list to be filled, there is user preset information.It is no Then there is no user preset information.
In a browser, each form item in browser list has respective control, and the control can control each list The filling of item, the judgement of content, and control record has the type of each form item.So, in one embodiment of the invention, The type of each form item in determination browser list in step s 110 includes:By the control identification function of browser, The type of the corresponding control of each form item in identification browser list.
Occurs the form item of UNKNOWN TYPE again to prevent other browser lists to be filled in browser, at this In one embodiment of invention, the method shown in Fig. 1 is further included:The list unknown for the type in browser list , according to the type for being finally filled into content in the form item and learning the form item, and recorded in form item type learning table. After filling automatically, if the unknown form item of present pattern in browser list to be filled, needs to be learnt Process, record the information such as the final filling data of corresponding form item.Here the data of final filling are that final confirmation is correct Data.The unknown form item of type fills being randomly generated, or that user is directly manually filling, or Be randomly generated it is incorrect after, user's again filled by hand, so, the test content being finally filled in the form item is user The content being manually filling or the content for being randomly generated and inserting.
So, the type of each form item in determination browser list in step s 110 also includes:According to form item Type learning table determines the type of each form item in browser list.
Fig. 2 realizes the device of filling browser list automatically in showing a kind of test according to an embodiment of the invention Schematic diagram.As shown in Fig. 2 the device 200 that browser list is filled in the realization automatically includes:
Pretreatment unit 210, is suitable in using test process, for browser list to be filled, judges whether to deposit In user preset information, and the type of each form item in determination browser list.
Wherein, browser list, just refers in using test process, when user uses browser, enters in a browser Filling frame during row filling information, because being the filling form for being formed in a browser, occurs in the case of browser is opened Filling form is known as browser list.For example, when user needs to log in a certain website by user name, password, identifying code, step on The form that user enters row information filling on lithosphere face is exactly browser list;Or user is when the registration of certain website account is carried out Carry out long form when essential information is filled, also referred to as browser list.
If not filling automatically function, need user to carry out hand-stuff, for the short list of browser, need filling Content it is less, the negative emotions of user will not be caused;But for the long list of browser, the quantity of information filled when such as registering compared with Greatly, Consumer's Experience will be substantially reduced by hand-stuff.
In this unit, user can presupposed information in a browser, when user uses browser, it is possible to by user Default information is automatically filled in browser list to be filled.It is being filled to browser list to be filled Before, it is first determined whether the user preset information of the browser list to be filled is existed for, if it exists, can be preferential Select the information with the type matching of each form item in browser list to insert this to be filled to browse from presupposed information In device list.
Include in the list of user preset information:The name of form item, the data type of each form item of correspondence, matching word The contents such as symbol string, user preset information, user can enter the default of row information, example by the name of the form item of the presupposed information Such as, the name of form item can be user name, password, phone number, ID (identity number) card No., mailbox, address etc..
Here the data type of corresponding each form item can be:Password, password domain are similar with text box, but are input into Content show round dot;Radio, such as radio button, man or female;Checkbox, check box;file:Domain is uploaded (depending on difficulty or ease journey Degree solves this type);Color, defines palette;Tel, defines the input domain of telephone number;Email, defines the input of email Domain;Url, input domain of the definition comprising URl addresses;Search, defines region of search;Number, input domain of the definition comprising numerical value; Range, input of the definition comprising digital value in certain limit;Date, definition choose day, the moon, the input domain in year;Month, definition Choose the moon, the input domain in year;Week, definition choose week, the input domain in year;Time, definition choose when, the input domain of second; Datetime, defines access time, life, the input domain in year (UTC time);Datatime-local, defines access time, day The moon, the input domain (local zone time) in year.
If it should be noted that in the list of presupposed information, user does not carry out pre- to classified informations such as phone numbers If can then randomly generate the information corresponding with the data type of form item, for example, user does not carry out pre- to phone number If then randomly generating with the 11 of 1 beginning as significant digits.Meanwhile, user can also be made by oneself by the list of presupposed information Adopted information it is default, and user can also carry out top set operation, then can priority treatment User Defined presupposed information.
In order to ensure the correctness of the information being automatically filled in list to be filled, also need to when filling automatically really The type of each form item in fixed browser list to be filled, the only presupposed information of type matching just can be filled out automatically Fill.
Filling processing unit 220, is suitable to when there is user preset information, according to the type of user preset information and browses The type of each form item in device list, user preset information is filled in the form item of type matching as test data; If also there is unfilled form item in browser list, the test number of respective type is generated according to the type of each form item According to being filled.
As the test data in browser list, but can there is user in judging browser in the presupposed information of user After presupposed information, in addition it is also necessary to judge the type and the class that there is presupposed information of each form item of list in browser to be filled Whether type matches, and in the case that only both match, just can be filled automatically.For example, a certain browser to be filled Have the form item of " telephone number " in list, its type is the input domain of telephone number, if in user preset information, have with The presupposed information type that " telephone number " form item matches is somebody's turn to do, is then filled automatically;If not with " telephone number " list The presupposed information type that item matches, then can not be filled automatically.
If also there is the unmatched form item of type with presupposed information in browser list, it is not filled automatically, Then matched test data can be generated at random according to the type of unfilled each form item to be filled at random.Because For test process, some information inserted in browser list are not necessarily really, as long as data form is correct .For example, random generation here can be:(1) generate phone number:First is 1;Second is 3/4/5/7/8 Any one position;The 9 next random numerals for generating 0-9.(2) generate ID (identity number) card No. (ABCDEFYYYYMMDDXXXR): Six bit digital address codes;Eight-digit number word date of birth code;Three bit digital sequence codes;One-bit digital check code.(3) generate mailbox: It is random to generate user name;User name+random mailbox Suffix array clustering.(4) url is generated at random:http:Www+ small letter random strings + random domain name.
If random filling is correct, user directly can determine, if filling is incorrect, user can cancel to be carried out again Generate at random, or user is directly manually filling correct data.
It can be seen that, in the test for improving prior art of the invention, the pattern of recording and playback, is made by user preset filling information For test data, the browser list of the network address opened to the browser is capable of achieving the function of filling automatically, saves and manually fills out The troublesome operation filled, strengthens the experience of user.
Browser list to be filled is each in browser list through filling automatically and generating at random data filling In the case of the type of form item is known, if the unknown form item of present pattern is gone back in browser list to be filled, In one embodiment of the present of invention, the filling processing unit 220, if going back present pattern in being further adapted for browser list Unknown form item, then generate the test data for matching and filled out according to the attribute description information of the unknown form item of type Fill.Here attribute description information can be:The mark and/or title of the regular expression and form item of form item.Its In, regular expression, also known as regular expression, regular expression be usually used to retrieval, replace those meet certain pattern (rule Text then), can refer to the rule of the data inserted in form item here, according to this rule it is known that this inserts the table Data mode in individual event.So, when the attribute description information of form item includes:
(1) regular expression of form item.
The filling processing unit 220, is suitable to meet canonical according to the generation of the regular expression of type unknown form item The test data of expression formula is filled.Here can be generated according to date_type by randexp.js and meet regular expressions The data of formula.For example, the regular expression of a certain form item is D1, then generation one is digital;If S1, then a word is generated Symbol;If S1-S9, then generate the character string of nine characters.
(2) mark and/or title of form item.
The filling processing unit 220, is suitable to meet institute according to the mark and/or title generation of the unknown form item of type The test data for stating the word implication of mark and/or title is filled.That is analyze the mark such as title of the form item It is filled.For example, the title of form item is " mail ", then the data of mail format can be inserted in the form item.
The mark of form item here can be:User name (name);Password (password);Passport NO. cardcode;Mailbox email;Phone number mobileNO.;Age age;Company company etc..
Fig. 3 shows a kind of showing for device for realizing filling automatically browser list in accordance with another embodiment of the present invention It is intended to.As shown in figure 3, the device 300 that browser list is filled in the realization automatically includes:Pretreatment unit 310, filling process single Unit 320, user preset information process unit 330 and type learning unit 340.Wherein, pretreatment unit 310, filling processes single Unit 320 has corresponding identical function with the pretreatment unit 210 shown in Fig. 2, filling processing unit 220, and identical part exists This repeats no more.
In the present invention, user can carry out the automatic filling of the browser list in the browser with presupposed information, here user Row information can be entered by the presupposed information plug-in unit in browser to preset.So, user preset information process unit 330 is suitable to User preset information configuration control is provided on browser page, for example, increases presupposed information in " setting " option of browser Configuration control;When the user preset information configuration control is triggered, such as user by clicking the configuration control by mouse right button, Output user preset information configuration interface, when user is clicked in corresponding presupposed information configuration interface again by left mouse button During a certain input frame, for user input user preset information;Each input item at wherein user preset information configuration interface is corresponding not Same type;Will be the input content in each input item on user preset information configuration interface corresponding with the type of corresponding input item Preserve, obtain user preset information.
If the browser list that user is not intended to all websites in the browser can be carried out by presupposed information Automatically fill, or some presupposed informations specified need to be filled in the website that some are specified automatically, then user can be pre- If the setting of station address URL during information, is carried out to some presupposed informations or to all presupposed informations, then, further, User preset information process unit 330, is suitable to user preset information is bound with the URL that user specifies.
The pretreatment unit 310, is suitable to judge whether to deposit bound URL and the browser list to be filled The user preset information of URL matchings, is to determine for browser list to be filled, there is user preset information.Otherwise not There is user preset information.
In a browser, each form item in browser list has respective control, and the control can control each list The filling of item, the judgement of content, and control record has the type of each form item.So, in one embodiment of the invention, The pretreatment unit 310, is suitable to the control identification function by browser, recognizes each form item correspondence in browser list Control type.
Occurs the form item of UNKNOWN TYPE again to prevent other browser lists to be filled in browser, at this In one embodiment of invention, the type learning unit 340 in the device 300 of filling browser list automatically is realized, it is right to be suitable to The unknown form item of type in browser list, according to the class for being finally filled into content in the form item and learning the form item Type, and recorded in form item type learning table.After filling automatically, if there is class in browser list to be filled The unknown form item of type, then need the process for being learnt, and records the information such as the final filling data of corresponding form item.Here The data of final filling are finally to confirm correct data.
The unknown form item of type fills being randomly generated, or that user is directly manually filling, and or Person be randomly generated it is incorrect after, user's again filled by hand, so, the content being finally filled in the form item is user's handss The dynamic test content inserted or the content for being randomly generated and inserting.
So, in one embodiment of the invention, the pretreatment unit 310, is further adapted for according to form item typology Habit table determines the type of each form item in browser list.
In sum, technology according to the present invention scheme, in using test process, user can be by inserting in browser Part presets the information of filling automatically in the browser, when the user test browser, for browser list to be filled, Judge whether user preset information, and determine the type of each form item in browser list;It is pre- if there is user If information, then the type according to each form item in the type and browser list of user preset information, by user preset information It is filled in the form item of type matching;If also there is unfilled form item in browser list, according to each form item Type generate respective type data be filled.It can be seen that, the mould of recording and playback in the test for improving prior art of the invention Formula, is used as test data by user preset filling information, and the browser list of the network address opened to the browser is capable of achieving Automatically the function of filling, saves hand-stuff troublesome operation, strengthens the experience of user.
It should be noted that:
Algorithm and display be not inherently related to any certain computer, virtual bench or miscellaneous equipment provided herein. Various fexible units can also be used together based on teaching in this.As described above, construct required by this kind of device Structure be obvious.Additionally, the present invention is also not for any certain programmed language.It is understood that, it is possible to use it is various Programming language realizes the content of invention described herein, and the description done to language-specific above is to disclose this Bright preferred forms.
In description mentioned herein, a large amount of details are illustrated.It is to be appreciated, however, that the enforcement of the present invention Example can be put into practice in the case where not having these details.In some instances, known method, structure is not been shown in detail And technology, so as not to obscure the understanding of this description.
Similarly, it will be appreciated that in order to simplify the disclosure and help understand one or more in each inventive aspect, exist Above to, in the description of the exemplary embodiment of the present invention, each feature of the present invention is grouped together into single enforcement sometimes In example, figure or descriptions thereof.However, should the method for the disclosure be construed to reflect following intention:I.e. required guarantor The more features of feature is expressly recited in each claim by the application claims ratio of shield.More precisely, such as following Claims it is reflected as, inventive aspect is less than all features of single embodiment disclosed above.Therefore, Thus the claims for following specific embodiment are expressly incorporated in the specific embodiment, wherein each claim itself All as the separate embodiments of the present invention.
Those skilled in the art are appreciated that can be carried out adaptively to the module in the equipment in embodiment Change and they are arranged in one or more different from embodiment equipment.Can be the module or list in embodiment Unit or component are combined into a module or unit or component, and can be divided in addition multiple submodule or subelement or Sub-component.In addition at least some in such feature and/or process or unit is excluded each other, can adopt any Combine to all features disclosed in this specification (including adjoint claim, summary and accompanying drawing) and so disclosed Where all processes or unit of method or equipment are combined.Unless expressly stated otherwise, this specification (includes adjoint power Profit is required, summary and accompanying drawing) disclosed in each feature can it is identical by offers, be equal to or the alternative features of similar purpose carry out generation Replace.
Although additionally, it will be appreciated by those of skill in the art that some embodiments described herein include other embodiments In some included features rather than further feature, but the combination of the feature of different embodiments means in of the invention Within the scope of and form different embodiments.For example, in the following claims, embodiment required for protection appoint One of meaning can in any combination mode using.
The present invention all parts embodiment can be realized with hardware, or with one or more processor operation Software module realize, or with combinations thereof realize.It will be understood by those of skill in the art that can use in practice Microprocessor or digital signal processor (DSP) fill browser list automatically realizing realization according to embodiments of the present invention Device in some or all parts some or all functions.The present invention is also implemented as performing institute here (for example, computer program and computer program are produced for some or all equipment of the method for description or program of device Product).Such program for realizing the present invention can be stored on a computer-readable medium, or can have one or more The form of signal.Such signal can be downloaded from internet website and be obtained, or provide on carrier signal, or to appoint What other forms is provided.
It should be noted that above-described embodiment the present invention will be described rather than limits the invention, and ability Field technique personnel can design alternative embodiment without departing from the scope of the appended claims.In the claims, Any reference markss between bracket should not be configured to limitations on claims.Word "comprising" is not excluded the presence of not Element listed in the claims or step.Word "a" or "an" before element does not exclude the presence of multiple such Element.The present invention can come real by means of the hardware for including some different elements and by means of properly programmed computer It is existing.If in the unit claim for listing equipment for drying, several in these devices can be by same hardware branch To embody.The use of word first, second, and third does not indicate that any order.These words can be explained and be run after fame Claim.
The invention discloses a kind of method that filling browser list automatically is realized in A1, test, wherein, the method bag Include:
In using test process, for browser list to be filled, user preset information is judged whether, and Determine the type of each form item in browser list;
If there is user preset information, then according to each form item in the type and browser list of user preset information Type, user preset information is filled in the form item of type matching as test data;
If also there is unfilled form item in browser list, respective type is generated according to the type of each form item Test data be filled.
A2, the method as described in A1, wherein, the method is further included:
If the unknown form item of present pattern is gone back in browser list, retouched according to the attribute of the unknown form item of type State information and generate the test data that matches and be filled.
A3, the method as described in A2, wherein,
The attribute description information of the form item includes:The regular expression of form item;
The attribute description information of the form item unknown according to type generates the test data for matching and is filled bag Include:It is filled according to the test data that the generation of the regular expression of type unknown form item meets regular expression.
A4, the method as described in A2, wherein,
The attribute description information of the form item includes:The mark and/or title of form item;
The attribute description information of the form item unknown according to type generates the test data for matching and is filled bag Include:The survey of the word implication for meeting the mark and/or title is generated according to the mark and/or title of the unknown form item of type Examination data are filled.
A5, the method as described in A1, wherein, the method is further included:
User preset information configuration control is provided on browser page;
When the user preset information configuration control is triggered, user preset information configuration interface is exported, for user input User preset information;The corresponding different type of each input item at wherein user preset information configuration interface;
Will be the input content in each input item on user preset information configuration interface corresponding with the type of corresponding input item Preserve, obtain user preset information.
A6, the method as described in A5, wherein,
The method is further included:User preset information is bound with the URL that user specifies;
For browser list to be filled, judge whether that user preset information includes:Judge whether to be tied up The user preset information that fixed URL is matched with the URL of the browser list to be filled, be determine it is clear for be filled Look at device list, there is user preset information.
A7, the method as described in A1, wherein, the type of each form item in the determination browser list includes:
By the control identification function of browser, the type of the corresponding control of each form item in identification browser list.
A8, the method as described in A1, wherein, the method is further included:
The form item unknown for the type in browser list, according to being finally filled in the form item, content study should The type of form item, and recorded in form item type learning table;
Wherein, the test content being finally filled in the form item is the content or be randomly generated that user is manually filling And the content inserted.
A9, the method as described in A8, wherein, the type of each form item in the determination browser list also includes:
The type of each form item in browser list is determined according to form item type learning table.
The invention also discloses the device of filling browser list automatically in B10, a kind of test, is realized, wherein, the device Including:
Pretreatment unit, is suitable in using test process, for browser list to be filled, judges whether to use The type of each form item in family presupposed information, and determination browser list;
Filling processing unit, is suitable to when there is user preset information, according to the type and browser of user preset information The type of each form item in list, user preset information is filled in the form item of type matching as test data;Such as Also there is unfilled form item in fruit browser list, then the test data of respective type is generated according to the type of each form item It is filled.
B11, the device as described in B10, wherein,
The filling processing unit, if the unknown form item of present pattern is gone back in being further adapted for browser list, Generate the test data for matching to be filled according to the attribute description information of the unknown form item of type.
B12, the device as described in B11, wherein,
The attribute description information of the form item includes:The regular expression of form item;
The filling processing unit, is suitable to meet regular expressions according to the generation of the regular expression of type unknown form item The test data of formula is filled.
B13, the device as described in B11, wherein,
The attribute description information of the form item includes:The mark and/or title of form item;
The filling processing unit, is suitable to according to the mark and/or title of the unknown form item of type are generated and met The test data of the word implication of mark and/or title is filled.
B14, the device as described in B10, wherein, the device is further included:
User preset information process unit, is suitable to user preset information configuration control is provided on browser page;When this When user preset information configuration control is triggered, user preset information configuration interface is exported, for user input user preset information; The corresponding different type of each input item at wherein user preset information configuration interface;Will be each on user preset information configuration interface Input content in input item is corresponding with the type of corresponding input item to be preserved, and obtains user preset information.
B15, the device as described in B14, wherein,
User preset information process unit, is suitable to user preset information is bound with the URL that user specifies;
The pretreatment unit, is suitable to the URL for judging whether to deposit bound URL and the browser list to be filled The user preset information of matching, is to determine for browser list to be filled, there is user preset information.
B16, the device as described in B10, wherein,
The pretreatment unit, is suitable to the control identification function by browser, recognizes each list in browser list The type of the corresponding control of item.
B17, the device as described in B10, wherein, the device is further included:
Type learning unit, is suitable to the form item unknown for the type in browser list, according to being finally filled into this In form item, content learns the type of the form item, and recorded in form item type learning table;
Wherein, the test content being finally filled in the form item is the content or be randomly generated that user is manually filling And the content inserted.
B18, the device as described in B17, wherein,
The pretreatment unit, each form item for being further adapted for being determined according to form item type learning table in browser list Type.

Claims (10)

1. a kind of method that filling browser list automatically is realized in test, wherein, the method includes:
In using test process, for browser list to be filled, user preset information is judged whether, and is determined The type of each form item in browser list;
If there is user preset information, then the class according to each form item in the type and browser list of user preset information Type, user preset information is filled in the form item of type matching as test data;
If also there is unfilled form item in browser list, the survey of respective type is generated according to the type of each form item Examination data are filled.
2. the method for claim 1, wherein the method is further included:
If the unknown form item of present pattern is gone back in browser list, believed according to the attribute description of the unknown form item of type Breath generates the test data for matching and is filled.
3. method as claimed in claim 2, wherein,
The attribute description information of the form item includes:The regular expression of form item;
The attribute description information of the form item unknown according to type generate the test data for matching be filled including:Root The test data for meeting regular expression according to the regular expression generation of the unknown form item of type is filled.
4. method as claimed in claim 2, wherein,
The attribute description information of the form item includes:The mark and/or title of form item;
The attribute description information of the form item unknown according to type generate the test data for matching be filled including:Root The test number of the word implication for meeting the mark and/or title is generated according to the mark and/or title of the unknown form item of type According to being filled.
5. the method for claim 1, wherein the method is further included:
User preset information configuration control is provided on browser page;
When the user preset information configuration control is triggered, user preset information configuration interface is exported, for user input user Presupposed information;The corresponding different type of each input item at wherein user preset information configuration interface;
Preserve the input content in each input item on user preset information configuration interface corresponding with the type of corresponding input item, Obtain user preset information.
6. method as claimed in claim 5, wherein,
The method is further included:User preset information is bound with the URL that user specifies;
For browser list to be filled, judge whether that user preset information includes:Bound in judging whether The user preset information that URL is matched with the URL of the browser list to be filled, is determined for browser to be filled , there is user preset information in list.
7. the type of each form item the method for claim 1, wherein in the determination browser list includes:
By the control identification function of browser, the type of the corresponding control of each form item in identification browser list.
8. the method for claim 1, wherein the method is further included:
The form item unknown for the type in browser list, learns the list according to content in the form item is finally filled into The type of item, and recorded in form item type learning table;
Wherein, the test content being finally filled in the form item is the content or be randomly generated and fill out that user is manually filling The content for entering.
9. method as claimed in claim 8, wherein, the type for determining each form item in browser list also includes:
The type of each form item in browser list is determined according to form item type learning table.
10. the device of filling browser list automatically is realized in a kind of test, wherein, the device includes:
Pretreatment unit, is suitable in using test process, for browser list to be filled, judges whether that user is pre- If the type of each form item in information, and determination browser list;
Filling processing unit, is suitable to when there is user preset information, according to the type and browser list of user preset information In each form item type, user preset information is filled in the form item of type matching as test data;If clear Look at and also there is unfilled form item in device list, then the test data for respective type being generated according to the type of each form item is carried out Filling.
CN201611187682.7A 2016-12-20 2016-12-20 Method and device for automatically filling browser forms in test Active CN106681973B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611187682.7A CN106681973B (en) 2016-12-20 2016-12-20 Method and device for automatically filling browser forms in test

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611187682.7A CN106681973B (en) 2016-12-20 2016-12-20 Method and device for automatically filling browser forms in test

Publications (2)

Publication Number Publication Date
CN106681973A true CN106681973A (en) 2017-05-17
CN106681973B CN106681973B (en) 2020-07-24

Family

ID=58869983

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611187682.7A Active CN106681973B (en) 2016-12-20 2016-12-20 Method and device for automatically filling browser forms in test

Country Status (1)

Country Link
CN (1) CN106681973B (en)

Cited By (11)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102978A (en) * 2017-05-24 2017-08-29 北京小度信息科技有限公司 Data earth-filling method, device and mobile terminal
CN107357562A (en) * 2017-05-24 2017-11-17 青岛海信移动通信技术股份有限公司 A kind of information fill method, device and client
CN107704104A (en) * 2017-10-11 2018-02-16 携程旅游信息技术(上海)有限公司 List input item association method, system, equipment and storage medium
CN108399128A (en) * 2018-02-28 2018-08-14 深圳前海桔子信息技术有限公司 A kind of generation method of user data, device, server and storage medium
CN108563618A (en) * 2018-03-15 2018-09-21 链家网(北京)科技有限公司 Change method and system on a kind of paper document line
CN109710534A (en) * 2018-12-29 2019-05-03 北京航天云路有限公司 Form list based on Custom Attributes monitors the method for inspection and system in real time
CN109783065A (en) * 2017-11-15 2019-05-21 财团法人资讯工业策进会 Generate the method and system of dialog mode user interface
CN112330277A (en) * 2020-11-03 2021-02-05 唐山恒智天成科技有限公司 Engineering data management system and management method
CN112835809A (en) * 2021-03-22 2021-05-25 亿企赢网络科技有限公司 Test data setting method, device, equipment and medium based on browser
CN113076728A (en) * 2021-03-12 2021-07-06 武汉木仓科技股份有限公司 Data filling method of dialog box and related equipment
CN113920333A (en) * 2021-09-01 2022-01-11 广州云硕科技发展有限公司 Intelligent management method and system for improving resident experience degree

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369271A (en) * 2007-08-17 2009-02-18 徐萍 Automatic filling mark module and its browser assembly
CN103581212A (en) * 2012-07-18 2014-02-12 百度在线网络技术(北京)有限公司 Automatic form filling method, system and device based on cloud analysis
CN104182467A (en) * 2014-07-21 2014-12-03 安徽华贞信息科技有限公司 Network data source detection method

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101369271A (en) * 2007-08-17 2009-02-18 徐萍 Automatic filling mark module and its browser assembly
CN103581212A (en) * 2012-07-18 2014-02-12 百度在线网络技术(北京)有限公司 Automatic form filling method, system and device based on cloud analysis
CN104182467A (en) * 2014-07-21 2014-12-03 安徽华贞信息科技有限公司 Network data source detection method

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107102978A (en) * 2017-05-24 2017-08-29 北京小度信息科技有限公司 Data earth-filling method, device and mobile terminal
CN107357562A (en) * 2017-05-24 2017-11-17 青岛海信移动通信技术股份有限公司 A kind of information fill method, device and client
CN107357562B (en) * 2017-05-24 2023-09-05 青岛海信移动通信技术股份有限公司 Information filling method, device and client
CN107102978B (en) * 2017-05-24 2020-11-24 北京星选科技有限公司 Data backfilling method and device and mobile terminal
CN107704104A (en) * 2017-10-11 2018-02-16 携程旅游信息技术(上海)有限公司 List input item association method, system, equipment and storage medium
CN107704104B (en) * 2017-10-11 2021-04-30 携程旅游信息技术(上海)有限公司 Form input item association method, system, device and storage medium
CN109783065A (en) * 2017-11-15 2019-05-21 财团法人资讯工业策进会 Generate the method and system of dialog mode user interface
CN108399128A (en) * 2018-02-28 2018-08-14 深圳前海桔子信息技术有限公司 A kind of generation method of user data, device, server and storage medium
CN108563618A (en) * 2018-03-15 2018-09-21 链家网(北京)科技有限公司 Change method and system on a kind of paper document line
CN109710534A (en) * 2018-12-29 2019-05-03 北京航天云路有限公司 Form list based on Custom Attributes monitors the method for inspection and system in real time
CN109710534B (en) * 2018-12-29 2022-01-11 北京航天云路有限公司 Form real-time monitoring and checking method and system based on custom attribute
CN112330277A (en) * 2020-11-03 2021-02-05 唐山恒智天成科技有限公司 Engineering data management system and management method
CN113076728A (en) * 2021-03-12 2021-07-06 武汉木仓科技股份有限公司 Data filling method of dialog box and related equipment
CN112835809A (en) * 2021-03-22 2021-05-25 亿企赢网络科技有限公司 Test data setting method, device, equipment and medium based on browser
CN113920333A (en) * 2021-09-01 2022-01-11 广州云硕科技发展有限公司 Intelligent management method and system for improving resident experience degree

Also Published As

Publication number Publication date
CN106681973B (en) 2020-07-24

Similar Documents

Publication Publication Date Title
CN106681973A (en) Method and device for achieving automatically filling browser sheet in test
CN107369075B (en) Commodity display method and device and electronic equipment
US20190377788A1 (en) Methods and systems for language-agnostic machine learning in natural language processing using feature extraction
CN107835231B (en) Feedback information processing method and terminal equipment
US9460458B1 (en) Methods and system of associating reviewable attributes with items
Weber et al. Coding the News: The role of computer code in filtering and distributing news
US10339614B2 (en) Waste analysis system and method
CN109508420B (en) Method and device for cleaning attributes of knowledge graph
US20090006181A1 (en) Capturing and utilizing consumer purchase intent information
CN107220094A (en) Page loading method and device and electronic equipment
US8122371B1 (en) Criteria-based structured ratings
US11586815B2 (en) Method, system and computer program product for generating artificial documents
CN103618698B (en) The processing method and processing device of cookie information
US20110191194A1 (en) Method and apparatus for generating menu information
US9626715B2 (en) Method and apparatus for associating menu information
CN104346461B (en) The method, apparatus and browser client of search and webpage element
US20170200213A1 (en) Information search method and information search device
CN107729317A (en) Evaluate the determination method, apparatus and server of label
CN106649347A (en) Interest information identification method and apparatus
JP2017134744A (en) Information processing system, information processing method, and information processing program
CN109815379A (en) A kind of intelligent search recommended method, storage medium and terminal for content
CN108038191A (en) Automatic generation method, electronic equipment and the computer-readable storage medium of e-book problem
CN107833339A (en) It is determined that the method, apparatus and electronic equipment of ranking duration
EP4109307A1 (en) Account authentication using synthetic merchants
CN109657073A (en) Method and apparatus for generating information

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant