@@ -160,29 +160,36 @@ public List<BrowsingContextInfo> getTopLevelContexts() {
160
160
new Command <>("browsingContext.getTree" , new HashMap <>(), browsingContextInfoListMapper ));
161
161
}
162
162
163
- // Yet to be implemented by browser vendors
164
- private void reload () {
165
- this .bidi .send (new Command <>(RELOAD , ImmutableMap .of (CONTEXT , id )));
163
+ public NavigationResult reload () {
164
+ return this .bidi .send (new Command <>(RELOAD , ImmutableMap .of (CONTEXT , id ), navigationInfoMapper ));
166
165
}
167
166
168
167
// Yet to be implemented by browser vendors
169
- private void reload (boolean ignoreCache ) {
170
- this .bidi .send (new Command <>(RELOAD , ImmutableMap .of (CONTEXT , id , "ignoreCache" , ignoreCache )));
168
+ private NavigationResult reload (boolean ignoreCache ) {
169
+ return this .bidi .send (new Command <>(
170
+ RELOAD ,
171
+ ImmutableMap .of (CONTEXT , id , "ignoreCache" , ignoreCache ),
172
+ navigationInfoMapper ));
171
173
}
172
174
173
- // Yet to be implemented by browser vendors
174
- private void reload (ReadinessState readinessState ) {
175
- this .bidi .send (
176
- new Command <>(RELOAD , ImmutableMap .of (CONTEXT , id , "wait" , readinessState .toString ())));
175
+ // TODO: Handle timeouts in case of Readiness state "interactive" and "complete".
176
+ // Refer https://github.com/w3c/webdriver-bidi/issues/188
177
+ public NavigationResult reload (ReadinessState readinessState ) {
178
+ return this .bidi .send (
179
+ new Command <>(
180
+ RELOAD ,
181
+ ImmutableMap .of (CONTEXT , id , "wait" , readinessState .toString ()),
182
+ navigationInfoMapper ));
177
183
}
178
184
179
185
// Yet to be implemented by browser vendors
180
- private void reload (boolean ignoreCache , ReadinessState readinessState ) {
181
- this .bidi .send (
186
+ private NavigationResult reload (boolean ignoreCache , ReadinessState readinessState ) {
187
+ return this .bidi .send (
182
188
new Command <>(
183
189
RELOAD ,
184
190
ImmutableMap .of (
185
- CONTEXT , id , "ignoreCache" , ignoreCache , "wait" , readinessState .toString ())));
191
+ CONTEXT , id , "ignoreCache" , ignoreCache , "wait" , readinessState .toString ()),
192
+ navigationInfoMapper ));
186
193
}
187
194
188
195
// Yet to be implemented by browser vendors
0 commit comments