Browse Source

[fix] gecko driver cannot detect the page load finish on preferences form submit. It now works with this dirty workaround..

Adam Tauber 8 years ago
parent
commit
629fa4355a
1 changed files with 20 additions and 24 deletions
  1. 20
    24
      tests/robot/test_basic.robot

+ 20
- 24
tests/robot/test_basic.robot View File

@@ -4,6 +4,14 @@ Test Setup      Open Browser  http://localhost:11111/
4 4
 Test Teardown   Close All Browsers
5 5
 
6 6
 
7
+*** Keywords ***
8
+Submit Preferences
9
+    Set Selenium Speed  2 seconds
10
+    Submit Form  id=search_form
11
+    Location Should Be  http://localhost:11111/
12
+    Set Selenium Speed  0 seconds
13
+
14
+
7 15
 *** Test Cases ***
8 16
 Front page
9 17
     Page Should Contain  about
@@ -33,8 +41,7 @@ Switch category
33 41
     Page Should Contain Checkbox  category_dummy
34 42
     Click Element  xpath=//*[.="general"]
35 43
     Click Element  xpath=//*[.="dummy"]
36
-    Submit Form  id=search_form
37
-    Location Should Be  http://localhost:11111/
44
+    Submit Preferences
38 45
     Checkbox Should Not Be Selected  category_general
39 46
     Checkbox Should Be Selected  category_dummy
40 47
 
@@ -43,8 +50,7 @@ Change language
43 50
     Page Should Contain  preferences
44 51
     Go To  http://localhost:11111/preferences
45 52
     Select From List  locale  hu
46
-    Submit Form  id=search_form
47
-    Location Should Be  http://localhost:11111/
53
+    Submit Preferences
48 54
     Page Should Contain  rólunk
49 55
     Page Should Contain  beállítások
50 56
 
@@ -53,13 +59,11 @@ Change method
53 59
     Page Should Contain  preferences
54 60
     Go To  http://localhost:11111/preferences
55 61
     Select From List  method  GET
56
-    Submit Form  id=search_form
57
-    Location Should Be  http://localhost:11111/
62
+    Submit Preferences
58 63
     Go To  http://localhost:11111/preferences
59 64
     List Selection Should Be  method  GET
60 65
     Select From List  method  POST
61
-    Submit Form  id=search_form
62
-    Location Should Be  http://localhost:11111/
66
+    Submit Preferences
63 67
     Go To  http://localhost:11111/preferences
64 68
     List Selection Should Be  method  POST
65 69
 
@@ -69,8 +73,7 @@ Change theme
69 73
     Go To  http://localhost:11111/preferences
70 74
     List Selection Should Be  theme  legacy
71 75
     Select From List  theme  oscar
72
-    Submit Form  id=search_form
73
-    Location Should Be  http://localhost:11111/
76
+    Submit Preferences
74 77
     Go To  http://localhost:11111/preferences
75 78
     List Selection Should Be  theme  oscar
76 79
 
@@ -80,8 +83,7 @@ Change safesearch
80 83
     Go To  http://localhost:11111/preferences
81 84
     List Selection Should Be  safesearch  None
82 85
     Select From List  safesearch  Strict
83
-    Submit Form  id=search_form
84
-    Location Should Be  http://localhost:11111/
86
+    Submit Preferences
85 87
     Go To  http://localhost:11111/preferences
86 88
     List Selection Should Be  safesearch  Strict
87 89
 
@@ -91,8 +93,7 @@ Change image proxy
91 93
     Go To  http://localhost:11111/preferences
92 94
     List Selection Should Be  image_proxy  Disabled
93 95
     Select From List  image_proxy  Enabled
94
-    Submit Form  id=search_form
95
-    Location Should Be  http://localhost:11111/
96
+    Submit Preferences
96 97
     Go To  http://localhost:11111/preferences
97 98
     List Selection Should Be  image_proxy  Enabled
98 99
 
@@ -102,8 +103,7 @@ Change search language
102 103
     Go To  http://localhost:11111/preferences
103 104
     List Selection Should Be  language  Automatic
104 105
     Select From List  language  Turkish (Turkey) - tr_TR
105
-    Submit Form  id=search_form
106
-    Location Should Be  http://localhost:11111/
106
+    Submit Preferences
107 107
     Go To  http://localhost:11111/preferences
108 108
     List Selection Should Be  language  Turkish (Turkey) - tr_TR
109 109
 
@@ -113,8 +113,7 @@ Change autocomplete
113 113
     Go To  http://localhost:11111/preferences
114 114
     List Selection Should Be  autocomplete  -
115 115
     Select From List  autocomplete  google
116
-    Submit Form  id=search_form
117
-    Location Should Be  http://localhost:11111/
116
+    Submit Preferences
118 117
     Go To  http://localhost:11111/preferences
119 118
     List Selection Should Be  autocomplete  google
120 119
 
@@ -126,8 +125,7 @@ Change allowed/disabled engines
126 125
     Element Should Contain  xpath=//label[@class="deny"][@for='engine_dummy_dummy_dummy']  Block
127 126
     Element Should Contain  xpath=//label[@class="deny"][@for='engine_general_general_dummy']  Block
128 127
     Click Element  xpath=//label[@class="deny"][@for='engine_general_general_dummy']
129
-    Submit Form  id=search_form
130
-    Location Should Be  http://localhost:11111/
128
+    Submit Preferences
131 129
     Page Should Contain  about
132 130
     Page Should Contain  preferences
133 131
     Go To  http://localhost:11111/preferences
@@ -141,16 +139,14 @@ Block a plugin
141 139
     Go To  http://localhost:11111/preferences
142 140
     List Selection Should Be  theme  legacy
143 141
     Select From List  theme  oscar
144
-    Submit Form  id=search_form
145
-    Location Should Be  http://localhost:11111/
142
+    Submit Preferences
146 143
     Go To  http://localhost:11111/preferences
147 144
     List Selection Should Be  theme  oscar
148 145
     Page Should Contain  Plugins
149 146
     Click Link  Plugins
150 147
     Checkbox Should Not Be Selected  id=plugin_HTTPS_rewrite
151 148
     Click Element  xpath=//label[@for='plugin_HTTPS_rewrite']
152
-    Submit Form  id=search_form
153
-    Location Should Be  http://localhost:11111/
149
+    Submit Preferences
154 150
     Go To  http://localhost:11111/preferences
155 151
     Page Should Contain  Plugins
156 152
     Click Link  Plugins