Skip to content

Commit beaf1ef

Browse files
authored
Fixing html5 inputs for different locales (#1356)
Fixes #1344
1 parent c02eb74 commit beaf1ef

File tree

4 files changed

+30
-34
lines changed

4 files changed

+30
-34
lines changed

.travis.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ before_script:
7070
- if [ "$JYTHON" == "true" ]; then
7171
$INTERPRETER -m pip install mockito;
7272
$INTERPRETER -m pip install robotstatuschecker;
73-
$INTERPRETER -m pip install python-dateutil;
7473
$INTERPRETER -m pip install -r requirements.txt;
7574
else
7675
$INTERPRETER -m pip install -r requirements-dev.txt;

atest/acceptance/keywords/textfields_html5.robot

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,62 +10,65 @@ Input field type color
1010
Log ${value} # Get value does not return the changed value
1111

1212
Input field type date
13-
${date} = Set Variable 11/22/2019
14-
Input Text id:date ${date}
13+
[Documentation] Date and time formats are difficult test because format
14+
... depends on the users machine where the test is run. Therefore only
15+
... checking that value is not empty and it should work in most locales.
16+
Input Text id:date 11-22-2019
1517
${value} = Get Value id:date
16-
${date} ${value} = Parse Two Dates ${date} ${value}
17-
Should Be Equal ${value} ${date}
18+
Should Not Be Empty ${value}
1819

1920
Input field type datetime-local
20-
${date} = Set Variable 04-03-002019 01:45PM
21-
Input Text id:datetime-local ${date}
21+
[Documentation] Date and time formats are difficult test because format
22+
... depends on the users machine where the test is run. Therefore only
23+
... checking that value is not empty and it should work in most locales.
24+
Input Text id:datetime-local 04-03-002019 01:45PM
2225
${value} = Get Value id:datetime-local
23-
${date} ${value} = Parse Two Dates ${date} ${value}
24-
Should Be Equal ${value} ${date}
26+
Should Not Be Empty ${value}
2527

2628
Input field type email
27-
Input Text id:email [email protected]
28-
${value} = Get Value id:email
29+
Input Text id:email [email protected]
30+
${value} = Get Value id:email
2931
Should Be Equal As Strings ${value} [email protected]
3032

3133
Input field type month
32-
Input Text id:month January2019
34+
Input Text id:month January2019
3335
${value} = Get Value id:month
3436
Log ${value} # Get value does not return the value
3537

3638
Input field type number
37-
Input Text id:number 42
38-
${value} = Get Value id:number
39+
Input Text id:number 42
40+
${value} = Get Value id:number
3941
Should Be Equal As Strings ${value} 42
4042

4143
Input field type range
42-
Input Text id:range 72
43-
${value} = Get Value id:range
44+
Input Text id:range 72
45+
${value} = Get Value id:range
4446
Should Be Equal As Strings ${value} 50 # Default value does not change when input is range
4547

4648
Input field type search
47-
Input Text id:search tidii
48-
${value} = Get Value id:search
49+
Input Text id:search tidii
50+
${value} = Get Value id:search
4951
Should Be Equal As Strings ${value} tidii
5052

5153
Input field type tel
52-
Input Text id:tel 123 456 567
53-
${value} = Get Value id:tel
54+
Input Text id:tel 123 456 567
55+
${value} = Get Value id:tel
5456
Should Be Equal As Strings ${value} 123 456 567
5557

5658
Input field type time
57-
${time} = Set Variable 02:34PM
58-
Input Text id:time ${time}
59+
[Documentation] Date and time formats are difficult test because format
60+
... depends on the users machine where the test is run. Therefore only
61+
... checking that value is not empty and it should work in most locales.
62+
Input Text id:time 02:34PM
5963
${value} = Get Value id:time
60-
${time} ${value} = Parse Two Dates ${time} ${value}
61-
Should Be Equal ${value} ${time}
64+
Should Not Be Empty ${value}
6265

6366
Input field type url
64-
Input Text id:url https://github.com/robotframework/SeleniumLibrary
65-
${value} = Get Value id:url
67+
Input Text id:url https://github.com/robotframework/SeleniumLibrary
68+
${value} = Get Value id:url
6669
Should Be Equal As Strings ${value} https://github.com/robotframework/SeleniumLibrary
6770

6871
Input field type week
69-
Input Text id:week 452019
70-
${value} = Get Value id:week
72+
Input Text id:week 452019
73+
${value} = Get Value id:week
7174
Should Be Equal As Strings ${value} 2019-W45

atest/resources/testlibs/date_parser.py

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

requirements-dev.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
mockito >= 1.0.0
55
robotstatuschecker
66
approvaltests >= 0.2.4
7-
python-dateutil >= 2.8.0
87

98
# Include normal dependencies from requirements.txt. Makes it possible to use
109
# requirements-dev.txt as a single requirement file in PyCharm and other IDEs.

0 commit comments

Comments
 (0)