Skip to content

Commit 0410d4e

Browse files
authored
Fix Press Keys test to work in mac (#1353)
Fixes #1352
1 parent 2c0116d commit 0410d4e

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

atest/acceptance/keywords/press_keys.robot

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
*** Settings ***
22
Test Setup Go To Page "forms/input_special_keys.html"
33
Resource ../resource.robot
4+
Library ../../resources/testlibs/ctrl_or_command.py
5+
6+
*** Variables ***
7+
${CTRL_OR_COMMAND} ${EMPTY}
48

59
*** Test Cases ***
610
Press Keys Normal Keys
@@ -86,6 +90,11 @@ Press Keys Multiple Times Without Element
8690

8791
Press Keys Without Element Special Keys
8892
Click Element text_field
89-
Press Keys None CTRL+A CTRL+v
93+
Press Keys None ${CTRL_OR_COMMAND}+A ${CTRL_OR_COMMAND}+v
9094
Click Button OK
9195
Wait Until Page Contains Please input text and click the button. Text will appear in the page. timeout=3
96+
97+
*** Keywords ***
98+
CTRL Or Command Key
99+
${CTRL_OR_COMMAND} = Ctrl Or Command Key
100+
Set Suite Variable ${CTRL_OR_COMMAND}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import platform
2+
3+
4+
def ctrl_or_command_key():
5+
if platform.system() == 'Darwin':
6+
return 'COMMAND'
7+
return 'CONTROL'

0 commit comments

Comments
 (0)