1use super::ZapApiError;
21use super::ZapService;
22use serde_json::Value;
23use std::collections::HashMap;
24
25pub fn option_chrome_driver_path(service: &ZapService) -> Result<Value, ZapApiError> {
34 let params = HashMap::new();
35 super::call(
36 service,
37 "selenium",
38 "view",
39 "optionChromeDriverPath",
40 params,
41 )
42}
43
44pub fn option_firefox_binary_path(service: &ZapService) -> Result<Value, ZapApiError> {
50 let params = HashMap::new();
51 super::call(
52 service,
53 "selenium",
54 "view",
55 "optionFirefoxBinaryPath",
56 params,
57 )
58}
59
60pub fn option_firefox_driver_path(service: &ZapService) -> Result<Value, ZapApiError> {
66 let params = HashMap::new();
67 super::call(
68 service,
69 "selenium",
70 "view",
71 "optionFirefoxDriverPath",
72 params,
73 )
74}
75
76pub fn option_ie_driver_path(service: &ZapService) -> Result<Value, ZapApiError> {
80 let params = HashMap::new();
81 super::call(service, "selenium", "view", "optionIeDriverPath", params)
82}
83
84pub fn option_phantom_js_binary_path(service: &ZapService) -> Result<Value, ZapApiError> {
90 let params = HashMap::new();
91 super::call(
92 service,
93 "selenium",
94 "view",
95 "optionPhantomJsBinaryPath",
96 params,
97 )
98}
99
100pub fn set_option_chrome_driver_path(
106 service: &ZapService,
107 string: String,
108) -> Result<Value, ZapApiError> {
109 let mut params = HashMap::new();
110 params.insert("String".to_string(), string);
111 super::call(
112 service,
113 "selenium",
114 "action",
115 "setOptionChromeDriverPath",
116 params,
117 )
118}
119
120pub fn set_option_firefox_binary_path(
126 service: &ZapService,
127 string: String,
128) -> Result<Value, ZapApiError> {
129 let mut params = HashMap::new();
130 params.insert("String".to_string(), string);
131 super::call(
132 service,
133 "selenium",
134 "action",
135 "setOptionFirefoxBinaryPath",
136 params,
137 )
138}
139
140pub fn set_option_firefox_driver_path(
146 service: &ZapService,
147 string: String,
148) -> Result<Value, ZapApiError> {
149 let mut params = HashMap::new();
150 params.insert("String".to_string(), string);
151 super::call(
152 service,
153 "selenium",
154 "action",
155 "setOptionFirefoxDriverPath",
156 params,
157 )
158}
159
160pub fn set_option_ie_driver_path(
164 service: &ZapService,
165 string: String,
166) -> Result<Value, ZapApiError> {
167 let mut params = HashMap::new();
168 params.insert("String".to_string(), string);
169 super::call(
170 service,
171 "selenium",
172 "action",
173 "setOptionIeDriverPath",
174 params,
175 )
176}
177
178pub fn set_option_phantom_js_binary_path(
184 service: &ZapService,
185 string: String,
186) -> Result<Value, ZapApiError> {
187 let mut params = HashMap::new();
188 params.insert("String".to_string(), string);
189 super::call(
190 service,
191 "selenium",
192 "action",
193 "setOptionPhantomJsBinaryPath",
194 params,
195 )
196}