Skip to content

Commit

Permalink
RED-1433 - removing support for Robot 2.9
Browse files Browse the repository at this point in the history
  • Loading branch information
joanna-may committed Jul 24, 2020
1 parent ffda1b1 commit 7aecde0
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 241 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _3-pdQBtFEeWSh6BKjAxDIw
Runtime-Version: 2.2.0.201706152316
Save-Time: 10/23/17 5:48 PM
Runtime-Version: 2.5.0.202001211718
Save-Time: 7/23/20 6:52 PM
Tags: Debug
Testcase-Type: ecl

Expand Down Expand Up @@ -49,100 +49,62 @@ exec-with-options -disableJobWaiting -command {
wait-for-automatic-vars


if [$robot_version | matches "^Robot Framework 2\.8\.\d .*"] {

try -times 5 -delay 1000 -command {
get-view Variables | get-tree | get-item -path "Automatic Variables" | get-property "getItemCount()" | equals 21| verify-true

with [get-view Variables | get-tree] {
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[0].getText()" | equals "${/}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[1].getText()" | equals "${:}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[2].getText()" | equals "${DEBUG_FILE}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[3].getText()" | equals "${EMPTY}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[4].getText()" | equals "${EXECDIR}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[5].getText()" | equals "${False}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[6].getText()" | equals "${LOG_FILE}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[7].getText()" | equals "${LOG_LEVEL}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[8].getText()" | equals "${None}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[9].getText()" | equals "${OUTPUT_DIR}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[10].getText()" | equals "${OUTPUT_FILE}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[11].getText()" | equals "${PREV_TEST_MESSAGE}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[12].getText()" | equals "${PREV_TEST_NAME}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[13].getText()" | equals "${PREV_TEST_STATUS}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[14].getText()" | equals "${REPORT_FILE}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[15].getText()" | equals "${SPACE}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[16].getText()" | equals "${TEMPDIR}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[17].getText()" | equals "${True}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[18].getText()" | equals "${\\n"
+ "}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[19].getText()" | equals "${null}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[20].getText()" | equals "@{EMPTY}" | verify-true
}

}

}-else{
// versions 2.9 and higher
try -times 5 -delay 1000 -command {
get-view Variables | get-tree | get-item -path "Automatic Variables" | get-property "getItemCount()" | equals 26| verify-true
}
wait 1000
with [get-view Variables | get-tree] {
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[0].getText()" | equals "${/}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[1].getText()" | equals "${:}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[2].getText()" | equals "${DEBUG_FILE}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[3].getText()" | equals "${EXECDIR}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[4].getText()" | equals "${False}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[5].getText()" | equals "${LOG_FILE}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[6].getText()" | equals "${LOG_LEVEL}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[7].getText()" | equals "${None}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[8].getText()" | equals "${OUTPUT_DIR}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[9].getText()" | equals "${OUTPUT_FILE}"

// versions 2.9 and higher
try -times 5 -delay 1000 -command {
get-view Variables | get-tree | get-item -path "Automatic Variables" | get-property "getItemCount()" | equals 26| verify-true
}
wait 1000
with [get-view Variables | get-tree] {
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[0].getText()" | equals "${/}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[1].getText()" | equals "${:}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[2].getText()" | equals "${DEBUG_FILE}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[3].getText()" | equals "${EXECDIR}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[4].getText()" | equals "${False}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[5].getText()" | equals "${LOG_FILE}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[6].getText()" | equals "${LOG_LEVEL}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[7].getText()" | equals "${None}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[8].getText()" | equals "${OUTPUT_DIR}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[9].getText()" | equals "${OUTPUT_FILE}"
| verify-true
}
//seperated to click
get-view Variables | get-tree | select "Automatic Variables/${\\/}" | key-type PageDown
wait 1000
with [get-view Variables | get-tree] {
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[10].getText()"
| equals "${PREV_TEST_MESSAGE}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[11].getText()"
| equals "${PREV_TEST_NAME}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[12].getText()"
| equals "${PREV_TEST_STATUS}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[13].getText()" | equals "${REPORT_FILE}"
| verify-true
}
//seperated to click
get-view Variables | get-tree | select "Automatic Variables/${\\/}" | key-type PageDown
wait 1000
with [get-view Variables | get-tree] {
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[10].getText()"
| equals "${PREV_TEST_MESSAGE}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[11].getText()"
| equals "${PREV_TEST_NAME}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[12].getText()"
| equals "${PREV_TEST_STATUS}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[13].getText()" | equals "${REPORT_FILE}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[14].getText()" | equals "${SPACE}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[15].getText()"
| equals "${SUITE_DOCUMENTATION}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[16].getText()" | equals "${SUITE_NAME}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[17].getText()" | equals "${SUITE_SOURCE}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[18].getText()" | equals "${TEMPDIR}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[19].getText()"
| equals "${TEST_DOCUMENTATION}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[20].getText()" | equals "${TEST_NAME}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[21].getText()" | equals "${True}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[22].getText()" | equals "${\\n"
+ "}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[23].getText()" | equals "${null}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[24].getText()"
| equals "&{SUITE_METADATA}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[25].getText()" | equals "@{TEST_TAGS}"
| verify-true
}

get-item -path "Automatic Variables" | get-property "getItems().TreeItem[14].getText()" | equals "${SPACE}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[15].getText()"
| equals "${SUITE_DOCUMENTATION}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[16].getText()" | equals "${SUITE_NAME}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[17].getText()" | equals "${SUITE_SOURCE}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[18].getText()" | equals "${TEMPDIR}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[19].getText()"
| equals "${TEST_DOCUMENTATION}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[20].getText()" | equals "${TEST_NAME}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[21].getText()" | equals "${True}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[22].getText()" | equals "${\\n"
+ "}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[23].getText()" | equals "${null}"
| verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[24].getText()"
| equals "&{SUITE_METADATA}" | verify-true
get-item -path "Automatic Variables" | get-property "getItems().TreeItem[25].getText()" | equals "@{TEST_TAGS}"
| verify-true

}
get-button "Terminate (M1+F2)" | click
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,15 @@ Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _BW-V4B8oEeWYlfCPyvfohw
Runtime-Version: 2.3.0.201806262310
Save-Time: 7/17/18 6:10 PM
Runtime-Version: 2.5.0.202001211718
Save-Time: 7/23/20 6:54 PM
Tags: Debug
Testcase-Type: ecl

------=_.content-0a7243a0-75d3-3d5f-9791-539de0e5b7ac
Content-Type: text/ecl
Entry-Name: .content

proc "robot-specific" [val robot2_8] [val robot_2_9]
{
if [$robot_version | matches "^Robot Framework 2\.8\.\d .*"] {
echo $robot_2_8
}
if [$robot_version | matches "^Robot Framework 2\.\9(\.\d)? .*"] {
echo $robot_2_9
}
//make for the feature if will be 3.x.x
if [$robot_version | matches "^Robot Framework 3\.\d(\.\d)? .*"] {
echo $robot_2_9
}
}

//set BP on 3 scripts

with [get-view "Project Explorer" | get-tree] {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Element-Version: 3.0
External-Reference:
Id: _1FqyIP1CEeS5jLC3g3M4Lw
Runtime-Version: 2.5.0.202001211718
Save-Time: 4/17/20 6:44 PM
Save-Time: 7/23/20 6:56 PM
Tags: Debug
Testcase-Type: ecl

Expand Down Expand Up @@ -90,12 +90,7 @@ exec-with-options -disableJobWaiting -command {
get-property "getItems().TreeItem[1].getText()" | equals "Automatic Variables" | verify-true
}


if [$robot_version | matches "^Robot Framework 2\.8\.\d .*"] {
get-view Variables | get-tree | get-item "${i}" | get-property "values['Value']" | equals $index | verify-true
}-else{
get-view Variables | get-tree | get-item "${i}" | get-property "values['Value']" | equals [plus $index 1] | verify-true
}
get-view Variables | get-tree | get-item "${i}" | get-property "values['Value']" | equals [plus $index 1] | verify-true

check-items-in-thred-view -index [plus $index 1 ] -line 7

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ Element-Type: testcase
Element-Version: 3.0
External-Reference:
Id: _kmM50CsHEeW667Afdo4DcA
Runtime-Version: 2.3.0.201806262310
Save-Time: 2/14/19 5:27 PM
Runtime-Version: 2.5.0.202001211718
Save-Time: 7/23/20 7:03 PM
Tags: Quick
Testcase-Type: ecl
Verifications: _Xbz7EJUqEeaXOtocAkFx_w
Expand Down Expand Up @@ -106,64 +106,36 @@ get-view "Project Explorer" | get-tree
| select [format "New/Robot Standard libraries [%s]" $robot_version] | double-click
wait 3000

if [$robot_version | matches "^Robot Framework 2\.9\.\d .*"] {
if [get-by-os -linux "Linux" -win "Windows"| equals "Windows"]{
with [get-view "Project Explorer" | get-tree] {
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | matches "BuiltIn \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[1].getText()" | matches "Collections \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[2].getText()" | matches "DateTime \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[3].getText()" | matches "Dialogs \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[4].getText()" | matches "Easter \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[5].getText()"
| matches "OperatingSystem \(\\d+\)" | verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[6].getText()" | matches "Process \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[7].getText()" | matches "Reserved \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[8].getText()" | matches "Screenshot \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[9].getText()" | matches "String \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[10].getText()" | matches "Telnet \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[11].getText()" | matches "XML \(\\d+\)"
| verify-true
}
}-else{
with [get-view "Project Explorer" | get-tree] {
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | matches "BuiltIn \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[1].getText()" | matches "Collections \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[2].getText()" | matches "DateTime \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[3].getText()" | equals "Dialogs (non-accessible)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[4].getText()" | matches "Easter \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[5].getText()"
| matches "OperatingSystem \(\\d+\)" | verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[6].getText()" | matches "Process \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[7].getText()" | matches "Reserved \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[8].getText()" | matches "Screenshot \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[9].getText()" | matches "String \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[10].getText()" | matches "Telnet \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[11].getText()" | matches "XML \(\\d+\)"
| verify-true
}

}

with [get-view "Project Explorer" | get-tree] {
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[0].getText()" | matches "BuiltIn \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[1].getText()" | matches "Collections \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[2].getText()" | matches "DateTime \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[3].getText()" | equals "Dialogs.*"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[4].getText()" | matches "Easter \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[5].getText()"
| matches "OperatingSystem \(\\d+\)" | verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[6].getText()" | matches "Process \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[7].getText()" | matches "Reserved \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[8].getText()" | matches "Screenshot \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[9].getText()" | matches "String \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[10].getText()" | matches "Telnet \(\\d+\)"
| verify-true
get-item New | get-property "getItems().TreeItem[0].getItems().TreeItem[11].getText()" | matches "XML \(\\d+\)"
| verify-true
}





//----------------------------------------------------------------------------------------------------------------------
Expand Down
Loading

0 comments on commit 7aecde0

Please sign in to comment.