diff --git a/Examples/BasicDataDrivenExample.robot b/Examples/BasicDataDrivenExample.robot index f614afa..ccaf6d0 100644 --- a/Examples/BasicDataDrivenExample.robot +++ b/Examples/BasicDataDrivenExample.robot @@ -1,5 +1,5 @@ *** Setting *** -Library ExcelDataDriver ./test_data/BasicDemoData.xlsx capture_screenshot=Skip +Library ExcelDataDriver ./test_data/BasicDemoData.xlsx capture_screenshot=Skip main_column_key=username Test Template Validate user data template *** Test Cases *** @@ -11,5 +11,4 @@ Validate user data template Log ${username} Log ${password} Log ${email} - Should Be True '${password}' != '${None}' - # Should Match Regexp ${email} [A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,} + Should Not Be Equal ${password} ${None} diff --git a/Examples/CustomExcelParser/CustomExcelParser.py b/Examples/CustomExcelParser/CustomExcelParser.py index 97a30e0..ecd2916 100644 --- a/Examples/CustomExcelParser/CustomExcelParser.py +++ b/Examples/CustomExcelParser/CustomExcelParser.py @@ -6,11 +6,11 @@ class CustomExcelParser(ABCParserStrategy): - def __init__(self): - ABCParserStrategy.__init__(self) + def __init__(self, main_column_key=None): + ABCParserStrategy.__init__(self, main_column_key) print('Using CustomExcelParser') - self.maximum_column_index_row = 3 - self.start_row = 1 + self.maximum_column_index_row = 2 + self.start_row = 3 def parsing_column_indexs(self, ws): ''' diff --git a/Examples/CustomParserExample.robot b/Examples/CustomParserExample.robot index 127548b..8265d72 100644 --- a/Examples/CustomParserExample.robot +++ b/Examples/CustomParserExample.robot @@ -1,12 +1,12 @@ *** Setting *** -Library CustomExcelParser/CustomExcelParser.py -Library ExcelDataDriver ./test_data/Custom_Template.xlsx custom_parser=CustomExcelParser capture_screenshot=OnFailed +Library CustomExcelParser/CustomExcelParser.py +Library ExcelDataDriver ./test_data/Custom_Template.xlsx main_column_key=sku custom_parser=CustomExcelParser capture_screenshot=OnFailed Test Template Demo template *** Test Cases *** Product promo price update for SKU '${sku}' ${None} ${None} ${None} ${None} ${None} ${None} ${None} ${None} ${None} - + *** Keywords *** Demo template [Arguments] ${sku} ${normal price} ${normal cost in vat} ${normal cost ex vat} ${normal cost gp} ${promotion price} ${promotion cost in vat} ${promotion cost ex vat} ${promotion cost gp} diff --git a/Examples/MergedSummaryReportExample.robot b/Examples/MergedSummaryReportExample.robot index 217fe4c..e41a52b 100644 --- a/Examples/MergedSummaryReportExample.robot +++ b/Examples/MergedSummaryReportExample.robot @@ -1,12 +1,11 @@ *** Setting *** Library String Library Collections -Library OperatingSystem -Library SeleniumLibrary +Library OperatingSystem Library ./CustomExcelParser/CustomExcelParser.py Library ExcelDataDriver manually_test=${True} *** Tasks *** Summary_test_result - Merged Excel Report CustomExcelParser + Merged Excel Report sku CustomExcelParser diff --git a/Examples/Parse_Product_Removal_Activity.robot b/Examples/Parse_Product_Removal_Activity.robot deleted file mode 100644 index 2abe609..0000000 --- a/Examples/Parse_Product_Removal_Activity.robot +++ /dev/null @@ -1,12 +0,0 @@ -*** Settings *** -Library ExcelDataDriver ./test_data/Product_Removal_Activity_Template.xlsx main_column_key=product_code capture_screenshot=Skip -Test Template Validate user data template - -*** Test Cases *** -Verify valid user '${product_code}' ${None} ${None} - -*** Keywords *** -Validate user data template - [Arguments] ${plan} ${product_code} - Log ${plan} - Log ${product_code} \ No newline at end of file diff --git a/Examples/SeleniumDataDrivenExample.robot b/Examples/SeleniumDataDrivenExample.robot index 29523ac..4ec6715 100644 --- a/Examples/SeleniumDataDrivenExample.robot +++ b/Examples/SeleniumDataDrivenExample.robot @@ -1,6 +1,6 @@ *** Setting *** Library SeleniumLibrary -Library ExcelDataDriver ./test_data/DefaultDemoData.xlsx capture_screenshot_when_fail_only=${True} +Library ExcelDataDriver ./test_data/DefaultDemoData.xlsx main_column_key=username capture_screenshot=OnFailed Test Template Invalid login Suite Teardown Close All Browsers diff --git a/Examples/test_data/BasicDemoData.xlsx b/Examples/test_data/BasicDemoData.xlsx index 5c4b1a1..c611aab 100644 Binary files a/Examples/test_data/BasicDemoData.xlsx and b/Examples/test_data/BasicDemoData.xlsx differ diff --git a/Examples/test_data/Custom_Template.xlsx b/Examples/test_data/Custom_Template.xlsx index f7572de..d232247 100644 Binary files a/Examples/test_data/Custom_Template.xlsx and b/Examples/test_data/Custom_Template.xlsx differ diff --git a/Examples/test_data/Product_Removal_Activity_Template.xlsx b/Examples/test_data/Product_Removal_Activity_Template.xlsx deleted file mode 100644 index ff92c74..0000000 Binary files a/Examples/test_data/Product_Removal_Activity_Template.xlsx and /dev/null differ