Find Selenium element naming rules

 All element names and page elements to be consistent when looking through the element selenium pagefactory mode, if the name is particularly long, separated by an underscore between the name

 

In the click event when the method name, should begin with click, for example clickLogin ()

When the procedure need to fill in the name of the event, we must begin with fill, such as fillUsername ()

In the method of choice when the time named, must begin with select, for example selectName ()

Step configuration parameters

Add parameters, parameter name in the feature file is written as an abbreviation or full function tested

  

 Create a json file, the file name and the name of the parameter file functions such as keeping AuthConfigParams

     

Generating a corresponding class name, class name and function name of the parameter file consistent AuthConfigParams e.g.

  

Adding a method of reading data in jsonDataReader

Property naming

Json file path name argument + path, e.g. authConfigPath

 Json file naming names + list List collection, for example authorConfigParamList

 

Acquisition parameters in the path name below method jsonDataReader

 

Acquiring parameter values ​​are named as follows in the method of FIG jsonDataReader

 

 

Guess you like

Origin www.cnblogs.com/aidegongyang/p/10953990.html