Skip to content

Commit 654086a

Browse files
committed
Clean up example script
1 parent 3bce11b commit 654086a

9 files changed

+12
-26
lines changed

Examples/BasicDataDrivenExample.robot

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
*** Setting ***
2-
Library ExcelDataDriver ./test_data/BasicDemoData.xlsx capture_screenshot=Skip
2+
Library ExcelDataDriver ./test_data/BasicDemoData.xlsx capture_screenshot=Skip main_column_key=username
33
Test Template Validate user data template
44

55
*** Test Cases ***
@@ -11,5 +11,4 @@ Validate user data template
1111
Log ${username}
1212
Log ${password}
1313
Log ${email}
14-
Should Be True '${password}' != '${None}'
15-
# Should Match Regexp ${email} [A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}
14+
Should Not Be Equal ${password} ${None}

Examples/CustomExcelParser/CustomExcelParser.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
class CustomExcelParser(ABCParserStrategy):
88

9-
def __init__(self):
10-
ABCParserStrategy.__init__(self)
9+
def __init__(self, main_column_key=None):
10+
ABCParserStrategy.__init__(self, main_column_key)
1111
print('Using CustomExcelParser')
12-
self.maximum_column_index_row = 3
13-
self.start_row = 1
12+
self.maximum_column_index_row = 2
13+
self.start_row = 3
1414

1515
def parsing_column_indexs(self, ws):
1616
'''

Examples/CustomParserExample.robot

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
*** Setting ***
2-
Library CustomExcelParser/CustomExcelParser.py
3-
Library ExcelDataDriver ./test_data/Custom_Template.xlsx custom_parser=CustomExcelParser capture_screenshot=OnFailed
2+
Library CustomExcelParser/CustomExcelParser.py
3+
Library ExcelDataDriver ./test_data/Custom_Template.xlsx main_column_key=sku custom_parser=CustomExcelParser capture_screenshot=OnFailed
44
Test Template Demo template
55

66

77
*** Test Cases ***
88
Product promo price update for SKU '${sku}' ${None} ${None} ${None} ${None} ${None} ${None} ${None} ${None} ${None}
9-
9+
1010
*** Keywords ***
1111
Demo template
1212
[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}
Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
*** Setting ***
22
Library String
33
Library Collections
4-
Library OperatingSystem
5-
Library SeleniumLibrary
4+
Library OperatingSystem
65
Library ./CustomExcelParser/CustomExcelParser.py
76
Library ExcelDataDriver manually_test=${True}
87

98

109
*** Tasks ***
1110
Summary_test_result
12-
Merged Excel Report CustomExcelParser
11+
Merged Excel Report sku CustomExcelParser

Examples/Parse_Product_Removal_Activity.robot

Lines changed: 0 additions & 12 deletions
This file was deleted.

Examples/SeleniumDataDrivenExample.robot

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
*** Setting ***
22
Library SeleniumLibrary
3-
Library ExcelDataDriver ./test_data/DefaultDemoData.xlsx capture_screenshot_when_fail_only=${True}
3+
Library ExcelDataDriver ./test_data/DefaultDemoData.xlsx main_column_key=username capture_screenshot=OnFailed
44
Test Template Invalid login
55
Suite Teardown Close All Browsers
66

Examples/test_data/BasicDemoData.xlsx

-91 Bytes
Binary file not shown.
87 Bytes
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)