summaryrefslogtreecommitdiff
path: root/case
diff options
context:
space:
mode:
Diffstat (limited to 'case')
-rw-r--r--case/profiles/insert_script.robot30
-rw-r--r--case/profiles/response_page.robot48
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