@@ -113,10 +113,6 @@ public BoundingBox boundingBox() {
113113
114114 @ Override
115115 public void check (CheckOptions options ) {
116- checkImpl (options );
117- }
118-
119- private void checkImpl (CheckOptions options ) {
120116 if (options == null ) {
121117 options = new CheckOptions ();
122118 }
@@ -127,10 +123,6 @@ private void checkImpl(CheckOptions options) {
127123
128124 @ Override
129125 public void click (ClickOptions options ) {
130- clickImpl (options );
131- }
132-
133- private void clickImpl (ClickOptions options ) {
134126 if (options == null ) {
135127 options = new ClickOptions ();
136128 }
@@ -141,10 +133,6 @@ private void clickImpl(ClickOptions options) {
141133
142134 @ Override
143135 public Frame contentFrame () {
144- return contentFrameImpl ();
145- }
146-
147- private Frame contentFrameImpl () {
148136 JsonObject json = sendMessage ("contentFrame" ).getAsJsonObject ();
149137 if (!json .has ("frame" )) {
150138 return null ;
@@ -154,10 +142,6 @@ private Frame contentFrameImpl() {
154142
155143 @ Override
156144 public void dblclick (DblclickOptions options ) {
157- dblclickImpl (options );
158- }
159-
160- private void dblclickImpl (DblclickOptions options ) {
161145 if (options == null ) {
162146 options = new DblclickOptions ();
163147 }
@@ -176,10 +160,6 @@ public void dispatchEvent(String type, Object eventInit) {
176160
177161 @ Override
178162 public void fill (String value , FillOptions options ) {
179- fillImpl (value , options );
180- }
181-
182- private void fillImpl (String value , FillOptions options ) {
183163 if (options == null ) {
184164 options = new FillOptions ();
185165 }
@@ -204,10 +184,6 @@ public String getAttribute(String name) {
204184
205185 @ Override
206186 public void hover (HoverOptions options ) {
207- hoverImpl (options );
208- }
209-
210- private void hoverImpl (HoverOptions options ) {
211187 if (options == null ) {
212188 options = new HoverOptions ();
213189 }
@@ -230,10 +206,6 @@ public String innerText() {
230206
231207 @ Override
232208 public String inputValue (InputValueOptions options ) {
233- return inputValueImpl (options );
234- }
235-
236- private String inputValueImpl (InputValueOptions options ) {
237209 if (options == null ) {
238210 options = new InputValueOptions ();
239211 }
@@ -289,9 +261,6 @@ public FrameImpl ownerFrame() {
289261
290262 @ Override
291263 public void press (String key , PressOptions options ) {
292- pressImpl (key , options );
293- }
294- private void pressImpl (String key , PressOptions options ) {
295264 if (options == null ) {
296265 options = new PressOptions ();
297266 }
@@ -303,10 +272,6 @@ private void pressImpl(String key, PressOptions options) {
303272
304273 @ Override
305274 public byte [] screenshot (ScreenshotOptions options ) {
306- return screenshotImpl (options );
307- }
308-
309- private byte [] screenshotImpl (ScreenshotOptions options ) {
310275 if (options == null ) {
311276 options = new ScreenshotOptions ();
312277 }
@@ -337,7 +302,12 @@ private byte[] screenshotImpl(ScreenshotOptions options) {
337302
338303 @ Override
339304 public void scrollIntoViewIfNeeded (ScrollIntoViewIfNeededOptions options ) {
340- scrollIntoViewIfNeededImpl (options );
305+ if (options == null ) {
306+ options = new ScrollIntoViewIfNeededOptions ();
307+ }
308+ options .timeout = frame .timeout (options .timeout );
309+ JsonObject params = gson ().toJsonTree (options ).getAsJsonObject ();
310+ sendMessage ("scrollIntoViewIfNeeded" , params );
341311 }
342312
343313 @ Override
@@ -371,14 +341,6 @@ public List<String> selectOption(SelectOption value, SelectOptionOptions options
371341 return selectOption (values , options );
372342 }
373343
374- private void scrollIntoViewIfNeededImpl (ScrollIntoViewIfNeededOptions options ) {
375- if (options == null ) {
376- options = new ScrollIntoViewIfNeededOptions ();
377- }
378- options .timeout = frame .timeout (options .timeout );
379- JsonObject params = gson ().toJsonTree (options ).getAsJsonObject ();
380- sendMessage ("scrollIntoViewIfNeeded" , params );
381- }
382344
383345 @ Override
384346 public List <String > selectOption (SelectOption [] values , SelectOptionOptions options ) {
@@ -411,7 +373,12 @@ private List<String> selectOption(JsonObject params) {
411373
412374 @ Override
413375 public void selectText (SelectTextOptions options ) {
414- selectTextImpl (options );
376+ if (options == null ) {
377+ options = new SelectTextOptions ();
378+ }
379+ options .timeout = frame .timeout (options .timeout );
380+ JsonObject params = gson ().toJsonTree (options ).getAsJsonObject ();
381+ sendMessage ("selectText" , params );
415382 }
416383
417384 @ Override
@@ -428,21 +395,9 @@ public void setInputFiles(Path files, SetInputFilesOptions options) {
428395 setInputFiles (new Path []{files }, options );
429396 }
430397
431- private void selectTextImpl (SelectTextOptions options ) {
432- if (options == null ) {
433- options = new SelectTextOptions ();
434- }
435- options .timeout = frame .timeout (options .timeout );
436- JsonObject params = gson ().toJsonTree (options ).getAsJsonObject ();
437- sendMessage ("selectText" , params );
438- }
439398
440399 @ Override
441400 public void setInputFiles (Path [] files , SetInputFilesOptions options ) {
442- setInputFilesImpl (files , options );
443- }
444-
445- void setInputFilesImpl (Path [] files , SetInputFilesOptions options ) {
446401 FrameImpl frame = ownerFrame ();
447402 if (frame == null ) {
448403 throw new Error ("Cannot set input files to detached element" );
@@ -463,10 +418,6 @@ public void setInputFiles(FilePayload files, SetInputFilesOptions options) {
463418
464419 @ Override
465420 public void setInputFiles (FilePayload [] files , SetInputFilesOptions options ) {
466- setInputFilesImpl (files , options );
467- }
468-
469- void setInputFilesImpl (FilePayload [] files , SetInputFilesOptions options ) {
470421 checkFilePayloadSize (files );
471422 if (options == null ) {
472423 options = new SetInputFilesOptions ();
@@ -479,10 +430,6 @@ void setInputFilesImpl(FilePayload[] files, SetInputFilesOptions options) {
479430
480431 @ Override
481432 public void tap (TapOptions options ) {
482- tapImpl (options );
483- }
484-
485- private void tapImpl (TapOptions options ) {
486433 if (options == null ) {
487434 options = new TapOptions ();
488435 }
@@ -493,20 +440,12 @@ private void tapImpl(TapOptions options) {
493440
494441 @ Override
495442 public String textContent () {
496- return textContentImpl ();
497- }
498-
499- private String textContentImpl () {
500443 JsonObject json = sendMessage ("textContent" ).getAsJsonObject ();
501444 return json .has ("value" ) ? json .get ("value" ).getAsString () : null ;
502445 }
503446
504447 @ Override
505448 public void type (String text , TypeOptions options ) {
506- typeImpl (text , options );
507- }
508-
509- private void typeImpl (String text , TypeOptions options ) {
510449 if (options == null ) {
511450 options = new TypeOptions ();
512451 }
@@ -518,10 +457,6 @@ private void typeImpl(String text, TypeOptions options) {
518457
519458 @ Override
520459 public void uncheck (UncheckOptions options ) {
521- uncheckImpl (options );
522- }
523-
524- private void uncheckImpl (UncheckOptions options ) {
525460 if (options == null ) {
526461 options = new UncheckOptions ();
527462 }
@@ -532,10 +467,6 @@ private void uncheckImpl(UncheckOptions options) {
532467
533468 @ Override
534469 public void waitForElementState (ElementState state , WaitForElementStateOptions options ) {
535- waitForElementStateImpl (state , options );
536- }
537-
538- private void waitForElementStateImpl (ElementState state , WaitForElementStateOptions options ) {
539470 if (options == null ) {
540471 options = new WaitForElementStateOptions ();
541472 }
@@ -554,10 +485,6 @@ private static String toProtocol(ElementState state) {
554485
555486 @ Override
556487 public ElementHandle waitForSelector (String selector , WaitForSelectorOptions options ) {
557- return waitForSelectorImpl (selector , options );
558- }
559-
560- private ElementHandle waitForSelectorImpl (String selector , WaitForSelectorOptions options ) {
561488 if (options == null ) {
562489 options = new WaitForSelectorOptions ();
563490 }
0 commit comments