|
26 | 26 |
|
27 | 27 | import org.openqa.selenium.grid.config.ConfigValue; |
28 | 28 | import org.openqa.selenium.grid.config.HasRoles; |
| 29 | +import org.openqa.selenium.grid.config.NonSplittingSplitter; |
29 | 30 | import org.openqa.selenium.grid.config.Role; |
30 | 31 |
|
31 | 32 | import java.util.Collections; |
| 33 | +import java.util.List; |
32 | 34 | import java.util.Set; |
33 | 35 |
|
34 | 36 | @SuppressWarnings("unused") |
35 | 37 | @AutoService(HasRoles.class) |
36 | 38 | public class RelayFlags implements HasRoles { |
37 | 39 |
|
| 40 | + @Parameter( |
| 41 | + names = {"--service-configuration"}, |
| 42 | + description = "Configuration for the service where calls will be relayed to. " + |
| 43 | + "It is recommended to provide this type of configuration through a toml config " + |
| 44 | + "file to improve readability. Command line example: " + |
| 45 | + "--service-configuration max-sessions=2 " + |
| 46 | + "stereotype='{\"browserName\": \"safari\", \"platformName\": \"iOS\", " + |
| 47 | + "\"appium:platformVersion\": \"14.5\"}}'", |
| 48 | + arity = 4, |
| 49 | + variableArity = true, |
| 50 | + splitter = NonSplittingSplitter.class) |
| 51 | + @ConfigValue( |
| 52 | + section = RELAY_SECTION, |
| 53 | + name = "configs", |
| 54 | + prefixed = true, |
| 55 | + example = "\n" + |
| 56 | + "max-sessions = 2\n" + |
| 57 | + "stereotype = \"{\"browserName\": \"safari\", \"platformName\": \"iOS\", " + |
| 58 | + "\"appium:platformVersion\": \"14.5\" }}\"") |
| 59 | + public List<String> driverConfiguration; |
| 60 | + |
38 | 61 | @Parameter( |
39 | 62 | names = {"--service-url"}, |
40 | 63 | description = "URL for connecting to the service that supports WebDriver commands, " |
41 | 64 | + "like an Appium server or a cloud service." |
42 | 65 | ) |
43 | 66 | @ConfigValue(section = RELAY_SECTION, name = "url", example = "http://localhost:4723") |
44 | 67 | private String serviceUrl; |
45 | | - |
46 | 68 | @Parameter( |
47 | 69 | names = {"--service-host"}, |
48 | 70 | description = "Host name where the service that supports WebDriver commands is running" |
49 | 71 | ) |
50 | 72 | @ConfigValue(section = RELAY_SECTION, name = "host", example = "\"localhost\"") |
51 | 73 | private String serviceHost; |
52 | | - |
53 | 74 | @Parameter( |
54 | 75 | names = {"--service-port"}, |
55 | 76 | description = "Port where the service that supports WebDriver commands is running" |
56 | 77 | ) |
57 | 78 | @ConfigValue(section = RELAY_SECTION, name = "port", example = "4723") |
58 | 79 | private Integer servicePort; |
59 | | - |
60 | 80 | @Parameter( |
61 | 81 | names = {"--service-status-endpoint"}, |
62 | 82 | description = "Endpoint to query the WebDriver service status, an HTTP 200 response " |
|
0 commit comments