Skip to content

Commit 6d59136

Browse files
committed
Update add-on APIs
Changed - Update the APIs of the following add-ons: - Automation Framework version 0.15.0; - Selenium version 15.8.0; Fixed - Add a graphql object to ClientApi. Signed-off-by: Akshath Kothari <github@ricekot.com>
1 parent bf84fcf commit 6d59136

File tree

4 files changed

+50
-0
lines changed

4 files changed

+50
-0
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,13 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

77
## [Unreleased]
8+
### Changed
9+
- Update the APIs of the following add-ons:
10+
- Automation Framework version 0.15.0;
11+
- Selenium version 15.8.0;
812

13+
### Fixed
14+
- Add a graphql object to ClientApi.
915

1016
## [1.10.0] - 2021-10-11
1117
### Added

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/core/ClientApi.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@
6161
import org.zaproxy.clientapi.gen.Core;
6262
import org.zaproxy.clientapi.gen.Exportreport;
6363
import org.zaproxy.clientapi.gen.ForcedUser;
64+
import org.zaproxy.clientapi.gen.Graphql;
6465
import org.zaproxy.clientapi.gen.HttpSessions;
6566
import org.zaproxy.clientapi.gen.ImportLogFiles;
6667
import org.zaproxy.clientapi.gen.Importurls;
@@ -120,6 +121,7 @@ public class ClientApi {
120121
public Core core = new Core(this);
121122
public Exportreport exportreport = new Exportreport(this);
122123
public ForcedUser forcedUser = new ForcedUser(this);
124+
public Graphql graphql = new Graphql(this);
123125
public HttpSessions httpSessions = new HttpSessions(this);
124126
public ImportLogFiles logImportFiles = new ImportLogFiles(this);
125127
public Importurls importurls = new Importurls(this);

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/gen/Automation.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,9 @@ public ApiResponse runPlan(String filepath) throws ClientApiException {
4848
map.put("filePath", filepath);
4949
return api.callApi("automation", "action", "runPlan", map);
5050
}
51+
52+
/** This component is optional and therefore the API will only work if it is installed */
53+
public ApiResponse endDelayJob() throws ClientApiException {
54+
return api.callApi("automation", "action", "endDelayJob", null);
55+
}
5156
}

subprojects/zap-clientapi/src/main/java/org/zaproxy/clientapi/gen/Selenium.java

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ public Selenium(ClientApi api) {
3636
this.api = api;
3737
}
3838

39+
/** This component is optional and therefore the API will only work if it is installed */
40+
public ApiResponse optionBrowserExtensions() throws ClientApiException {
41+
return api.callApi("selenium", "view", "optionBrowserExtensions", null);
42+
}
43+
44+
/**
45+
* Returns the current path to Chrome binary
46+
*
47+
* <p>This component is optional and therefore the API will only work if it is installed
48+
*/
49+
public ApiResponse optionChromeBinaryPath() throws ClientApiException {
50+
return api.callApi("selenium", "view", "optionChromeBinaryPath", null);
51+
}
52+
3953
/**
4054
* Returns the current path to ChromeDriver
4155
*
@@ -69,6 +83,11 @@ public ApiResponse optionIeDriverPath() throws ClientApiException {
6983
return api.callApi("selenium", "view", "optionIeDriverPath", null);
7084
}
7185

86+
/** This component is optional and therefore the API will only work if it is installed */
87+
public ApiResponse optionLastDirectory() throws ClientApiException {
88+
return api.callApi("selenium", "view", "optionLastDirectory", null);
89+
}
90+
7291
/**
7392
* Returns the current path to PhantomJS binary
7493
*
@@ -78,6 +97,17 @@ public ApiResponse optionPhantomJsBinaryPath() throws ClientApiException {
7897
return api.callApi("selenium", "view", "optionPhantomJsBinaryPath", null);
7998
}
8099

100+
/**
101+
* Sets the current path to Chrome binary
102+
*
103+
* <p>This component is optional and therefore the API will only work if it is installed
104+
*/
105+
public ApiResponse setOptionChromeBinaryPath(String string) throws ClientApiException {
106+
Map<String, String> map = new HashMap<>();
107+
map.put("String", string);
108+
return api.callApi("selenium", "action", "setOptionChromeBinaryPath", map);
109+
}
110+
81111
/**
82112
* Sets the current path to ChromeDriver
83113
*
@@ -119,6 +149,13 @@ public ApiResponse setOptionIeDriverPath(String string) throws ClientApiExceptio
119149
return api.callApi("selenium", "action", "setOptionIeDriverPath", map);
120150
}
121151

152+
/** This component is optional and therefore the API will only work if it is installed */
153+
public ApiResponse setOptionLastDirectory(String string) throws ClientApiException {
154+
Map<String, String> map = new HashMap<>();
155+
map.put("String", string);
156+
return api.callApi("selenium", "action", "setOptionLastDirectory", map);
157+
}
158+
122159
/**
123160
* Sets the current path to PhantomJS binary
124161
*

0 commit comments

Comments
 (0)