diff options
| author | dongxiaoyan <[email protected]> | 2021-06-15 19:37:46 +0800 |
|---|---|---|
| committer | dongxiaoyan <[email protected]> | 2021-06-15 19:37:46 +0800 |
| commit | 0847bdd64d47f18ca995a81d3560b4bae9b04e1b (patch) | |
| tree | 6def734f9ecb7fc2a97196f5e48839ae6c1dd0d6 /case/profiles | |
| parent | 3c8341971455d3d1b0981607426cff9674496c0b (diff) | |
Diffstat (limited to 'case/profiles')
| -rw-r--r-- | case/profiles/insert_script.robot | 30 | ||||
| -rw-r--r-- | case/profiles/response_page.robot | 48 |
2 files changed, 78 insertions, 0 deletions
diff --git a/case/profiles/insert_script.robot b/case/profiles/insert_script.robot new file mode 100644 index 0000000..0d229bb --- /dev/null +++ b/case/profiles/insert_script.robot @@ -0,0 +1,30 @@ +****** Settings ***
+Library yaml
+Library OperatingSystem
+Library Selenium2Library
+Resource ../../variable/common_variable.txt
+Resource ../../keyword/common/page.robot
+
+*** Variables ***
+
+*** Test Cases ***
+insert_script
+ log ${TEST NAME}
+ # 读取模板文件内容
+ ${yamltemplate} YamlLoad ${path}/data/template/page_template.yaml
+ ${objtemplate} Get From Dictionary ${yamltemplate} ${TEST NAME}_page
+ # 读取数据文件内容
+ ${yamlData} YamlLoad ${path}/data/profiles/insert_script_data.yaml
+ ${objDataList} Get From Dictionary ${yamlData} ${TEST NAME}_data
+ # 读取模板文件中OpenCreateOrEditPageIds中的数据(打开页面)
+ ${openCreateOrEditPageIds} Get From Dictionary ${objtemplate} OpenCreateOrEditPage
+ # 读取模板文件中PageData中的数据(打开页面)
+ ${tempData} Get From Dictionary ${objtemplate} PageData
+ ${OkOrCance} Get From Dictionary ${objtemplate} OkOrCancel
+ FOR ${objData} IN @{objDataList}
+ ${pageData} CreateOrEditPage ${tempData} ${objData} ${openCreateOrEditPageIds} ${OkOrCance}
+
+ END
+
+
+
\ No newline at end of file diff --git a/case/profiles/response_page.robot b/case/profiles/response_page.robot new file mode 100644 index 0000000..9e05387 --- /dev/null +++ b/case/profiles/response_page.robot @@ -0,0 +1,48 @@ +****** Settings ***
+Library yaml
+Library OperatingSystem
+Library Selenium2Library
+Resource ../../variable/common_variable.txt
+Resource ../../keyword/common/page.robot
+
+*** Variables ***
+
+*** Test Cases ***
+
+response_page
+ log ${TEST NAME}
+ # 读取模板文件内容
+ ${yamltemplate} YamlLoad ${path}/data/template/page_template.yaml
+ ${objtemplate} Get From Dictionary ${yamltemplate} ${TEST NAME}_page
+ # 读取数据文件内容
+ ${yamlData} YamlLoad ${path}/data/profiles/response_page_data.yaml
+ ${objDataList} Get From Dictionary ${yamlData} ${TEST NAME}_data
+ # 读取模板文件中OpenCreateOrEditPageIds中的数据(打开页面)
+ ${openCreateOrEditPageIds} Get From Dictionary ${objtemplate} OpenCreateOrEditPage
+ # 读取模板文件中PageData中的数据(打开页面)
+ ${tempData} Get From Dictionary ${objtemplate} PageData
+ ${OkOrCance} Get From Dictionary ${objtemplate} OkOrCancel
+ FOR ${objData} IN @{objDataList}
+ ${pageData} CreateOrEditPage ${tempData} ${objData} ${openCreateOrEditPageIds} ${OkOrCance}
+
+ END
+
+
+
+
+# response_page
+ # log ${TEST NAME}
+ # ${yamlData}= Get File ${path}/data/profiles/response_page_template.yaml
+ # ${loadedData}= yaml.Safe Load ${yamlData}
+ # ${list} Get From Dictionary ${loadedData} ${TEST NAME}_page
+
+ # ${listType} = Evaluate type(${list})
+ # FOR ${objData} IN @{list}
+ # ${tempData} Get From Dictionary ${objData} OpenCreateOrEditPageIds
+ # ${openCreateOrEditPageIds} OpenCreateOREdit ${tempData}
+ # ${tempData} Get From Dictionary ${objData} PageData
+ # ${pageData} OperatPage ${tempData}
+ # ${tempData} Get From Dictionary ${objData} OkOrCancel
+ # ${okOrCancel} OkOrCancel ${tempData}
+ # END
+
\ No newline at end of file |
