@@ -300,7 +300,7 @@ Json::Value NewSessionCommandHandler::ProcessCapabilities(const IECommandExecuto
300
300
LOG (DEBUG) << " Processing matched capability set with index " << i;
301
301
IECommandExecutor& mutable_executor = const_cast <IECommandExecutor&>(executor);
302
302
303
- Json::Value unexpected_alert_behavior = this ->GetCapability (merged_capabilities, UNHANDLED_PROMPT_BEHAVIOR_CAPABILITY, Json::stringValue, " " );
303
+ Json::Value unexpected_alert_behavior = this ->GetCapability (merged_capabilities, UNHANDLED_PROMPT_BEHAVIOR_CAPABILITY, Json::stringValue, Json::Value (Json::stringValue) );
304
304
mutable_executor.set_unexpected_alert_behavior (unexpected_alert_behavior.asString ());
305
305
306
306
Json::Value page_load_strategy = this ->GetCapability (merged_capabilities, PAGE_LOAD_STRATEGY_CAPABILITY, Json::stringValue, NORMAL_PAGE_LOAD_STRATEGY);
@@ -367,7 +367,7 @@ void NewSessionCommandHandler::SetBrowserFactorySettings(const IECommandExecutor
367
367
Json::Value ignore_zoom_setting = this ->GetCapability (capabilities, IGNORE_ZOOM_SETTING_CAPABILITY, Json::booleanValue, false );
368
368
factory_settings.ignore_zoom_setting = ignore_zoom_setting.asBool ();
369
369
370
- Json::Value browser_attach_timeout = this ->GetCapability (capabilities, BROWSER_ATTACH_TIMEOUT_CAPABILITY, Json::intValue, 0 );
370
+ Json::Value browser_attach_timeout = this ->GetCapability (capabilities, BROWSER_ATTACH_TIMEOUT_CAPABILITY, Json::intValue, Json::Value (Json::intValue) );
371
371
factory_settings.browser_attach_timeout = browser_attach_timeout.asInt ();
372
372
373
373
Json::Value initial_url = this ->GetCapability (capabilities, INITIAL_BROWSER_URL_CAPABILITY, Json::stringValue, default_initial_url);
@@ -379,7 +379,7 @@ void NewSessionCommandHandler::SetBrowserFactorySettings(const IECommandExecutor
379
379
Json::Value force_shell_windows_api = this ->GetCapability (capabilities, FORCE_SHELL_WINDOWS_API_CAPABILITY, Json::booleanValue, false );
380
380
factory_settings.force_shell_windows_api = force_shell_windows_api.asBool ();
381
381
382
- Json::Value browser_command_line_switches = this ->GetCapability (capabilities, BROWSER_COMMAND_LINE_SWITCHES_CAPABILITY, Json::stringValue, " " );
382
+ Json::Value browser_command_line_switches = this ->GetCapability (capabilities, BROWSER_COMMAND_LINE_SWITCHES_CAPABILITY, Json::stringValue, Json::Value (Json::stringValue) );
383
383
factory_settings.browser_command_line_switches = browser_command_line_switches.asString ();
384
384
385
385
Json::Value ensure_clean_session = this ->GetCapability (capabilities, ENSURE_CLEAN_SESSION_CAPABILITY, Json::booleanValue, false );
@@ -444,13 +444,13 @@ void NewSessionCommandHandler::SetInputSettings(const IECommandExecutor& executo
444
444
Json::Value enable_native_events = this ->GetCapability (capabilities, NATIVE_EVENTS_CAPABILITY, Json::booleanValue, true );
445
445
input_manager_settings.use_native_events = enable_native_events.asBool ();
446
446
447
- Json::Value scroll_behavior = this ->GetCapability (capabilities, ELEMENT_SCROLL_BEHAVIOR_CAPABILITY, Json::intValue, 0 );
447
+ Json::Value scroll_behavior = this ->GetCapability (capabilities, ELEMENT_SCROLL_BEHAVIOR_CAPABILITY, Json::intValue, Json::Value (Json::intValue) );
448
448
input_manager_settings.scroll_behavior = static_cast <ElementScrollBehavior>(scroll_behavior.asInt ());
449
449
450
450
Json::Value require_window_focus = this ->GetCapability (capabilities, REQUIRE_WINDOW_FOCUS_CAPABILITY, Json::booleanValue, false );
451
451
input_manager_settings.require_window_focus = require_window_focus.asBool ();
452
452
453
- Json::Value file_upload_dialog_timeout = this ->GetCapability (capabilities, FILE_UPLOAD_DIALOG_TIMEOUT_CAPABILITY, Json::intValue, 0 );
453
+ Json::Value file_upload_dialog_timeout = this ->GetCapability (capabilities, FILE_UPLOAD_DIALOG_TIMEOUT_CAPABILITY, Json::intValue, Json::Value (Json::intValue) );
454
454
if (file_upload_dialog_timeout.asInt () > 0 ) {
455
455
mutable_executor.set_file_upload_dialog_timeout (file_upload_dialog_timeout.asInt ());
456
456
}
0 commit comments