File tree Expand file tree Collapse file tree
java/src/org/openqa/selenium/manager Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,8 +18,8 @@ java_export(
1818 ],
1919 deps = [
2020 "//java/src/org/openqa/selenium:core" ,
21+ "//java/src/org/openqa/selenium/json" ,
2122 artifact ("com.google.guava:guava" ),
22- artifact ("com.google.code.gson:gson" ),
2323 ],
2424)
2525
Original file line number Diff line number Diff line change 1818
1919import com .google .common .collect .ImmutableList ;
2020import com .google .common .io .CharStreams ;
21- import com .google .gson .GsonBuilder ;
2221import org .openqa .selenium .Beta ;
2322import org .openqa .selenium .Capabilities ;
2423import org .openqa .selenium .Platform ;
2524import org .openqa .selenium .WebDriverException ;
25+ import org .openqa .selenium .json .Json ;
2626
2727import java .io .File ;
2828import java .io .IOException ;
@@ -113,7 +113,7 @@ private static String runCommand(String... command) {
113113 throw new WebDriverException ("Unsuccessful command executed: " + Arrays .toString (command ) +
114114 "\n " + output );
115115 }
116- SeleniumManagerJsonOutput jsonOutput = new GsonBuilder ().create (). fromJson (output ,
116+ SeleniumManagerJsonOutput jsonOutput = new Json ().toType (output ,
117117 SeleniumManagerJsonOutput .class );
118118 jsonOutput .logs .stream ().filter (log -> log .level .equalsIgnoreCase (WARN ))
119119 .forEach (log -> LOG .warning (log .message ));
Original file line number Diff line number Diff line change 2020
2121public class SeleniumManagerJsonOutput {
2222
23- List <Log > logs ;
24- Result result ;
23+ public List <Log > logs ;
24+ public Result result ;
2525
26- class Log {
27- String level ;
26+ public List <Log > getLogs () {
27+ return logs ;
28+ }
29+
30+ public void setLogs (List <Log > logs ) {
31+ this .logs = logs ;
32+ }
33+
34+ public Result getResult () {
35+ return result ;
36+ }
37+
38+ public void setResult (Result result ) {
39+ this .result = result ;
40+ }
41+
42+ public static class Log {
43+ public String level ;
2844 long timestamp ;
29- String message ;
45+ public String message ;
46+
47+ public String getLevel () {
48+ return level ;
49+ }
50+
51+ public void setLevel (String level ) {
52+ this .level = level ;
53+ }
54+
55+ public long getTimestamp () {
56+ return timestamp ;
57+ }
58+
59+ public void setTimestamp (long timestamp ) {
60+ this .timestamp = timestamp ;
61+ }
62+
63+ public String getMessage () {
64+ return message ;
65+ }
66+
67+ public void setMessage (String message ) {
68+ this .message = message ;
69+ }
3070 }
3171
32- class Result {
33- int code ;
34- String message ;
72+ public static class Result {
73+ public int code ;
74+ public String message ;
75+
76+ public int getCode () {
77+ return code ;
78+ }
79+
80+ public void setCode (int code ) {
81+ this .code = code ;
82+ }
83+
84+ public String getMessage () {
85+ return message ;
86+ }
87+
88+ public void setMessage (String message ) {
89+ this .message = message ;
90+ }
3591 }
3692
3793}
You can’t perform that action at this time.
0 commit comments