Skip to content

Commit

Permalink
Hopefully this is a better approach to changing the time values
Browse files Browse the repository at this point in the history
Issue #138
  • Loading branch information
damies13 committed Apr 26, 2024
1 parent b45ec88 commit ff18d58
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 8 deletions.
30 changes: 30 additions & 0 deletions Tests/Regression/Reporter/GUI_Common.robot
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,36 @@ Click Text
Click
Take A Screenshot

Get Text Value To Right Of
[Arguments] ${label} ${offsetx}=50 ${offsety}=0
${labell}= Convert To Lower Case ${label}
${img}= Set Variable reporter_${platform}_label_${labell}.png
${value}= Copy From The Right Of ${img}
Take A Screenshot
[Return] ${value}

Set Text Value To Right Of
[Arguments] ${label} ${value} ${offsetx}=50 ${offsety}=0
${labell}= Convert To Lower Case ${label}
${img}= Set Variable reporter_${platform}_label_${labell}.png
${imgsize}= Get Image Size ${IMAGE_DIR}${/}${img}
Log ${imgsize}
${offsetx}= Evaluate int(${imgsize}[0]/2)+5
Log ${offsetx}
Log ${CURDIR}
Log ${IMAGE_DIR}
Wait For ${img} timeout=300
@{coordinates}= Locate ${img}
${x}= Evaluate ${coordinates}[0]+${offsetx}
${y}= Evaluate ${coordinates}[1]+${offsety}
@{coordinates}= Create List ${x} ${y}
Move To ${coordinates}
Triple Click
Type
Take A Screenshot
${value2}= Copy From The Right Of ${img}
Should Be Equal As Strings ${value} ${value2}

Get Last Screenshot
Log ${OUTPUT FILE}
${path} ${file}= Split Path ${OUTPUT FILE}
Expand Down
22 changes: 14 additions & 8 deletions Tests/Regression/Reporter/GUI_Features.robot
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,22 @@ Whole report time range
Click Section Report

# Set start time 14:20
Select Field With Label StartTime
Press Combination KEY.END
Press Combination KEY.backspace KEY.backspace
Type 20
# Select Field With Label StartTime
# Press Combination KEY.END
# Press Combination KEY.backspace KEY.backspace
# Type 20
${StartTime}= Get Text Value To Right Of StartTime
${StartTime}= Replace String ${StartTime} 14:11 14:20
Set Text Value To Right Of StartTime ${StartTime}

# Set start time 14:58
Select Field With Label EndTime
Press Combination KEY.END
Press Combination KEY.backspace KEY.backspace KEY.backspace KEY.backspace KEY.backspace KEY.backspace KEY.backspace
Type 14:58
# Select Field With Label EndTime
# Press Combination KEY.END
# Press Combination KEY.backspace KEY.backspace KEY.backspace KEY.backspace KEY.backspace KEY.backspace KEY.backspace
# Type 14:58
${EndTime}= Get Text Value To Right Of EndTime
${EndTime}= Replace String ${EndTime} 15:00 14:58
Set Text Value To Right Of EndTime ${EndTime}

Select Field With Label Title

Expand Down

0 comments on commit ff18d58

Please sign in to comment.