20
20
import io .github .seleniumquery .functions .SeleniumQueryFunctions ;
21
21
import io .github .seleniumquery .functions .as .SeleniumQueryPlugin ;
22
22
import io .github .seleniumquery .functions .as .StandardPlugins ;
23
- import io .github .seleniumquery .functions .jquery .attributes .AttrFunction ;
24
- import io .github .seleniumquery .functions .jquery .attributes .HasClassFunction ;
25
- import io .github .seleniumquery .functions .jquery .attributes .RemoveAttrFunction ;
26
- import io .github .seleniumquery .functions .jquery .events .ClickFunction ;
27
- import io .github .seleniumquery .functions .jquery .forms .FocusFunction ;
28
- import io .github .seleniumquery .functions .jquery .forms .SubmitFunction ;
29
- import io .github .seleniumquery .functions .jquery .manipulation .HtmlFunction ;
30
- import io .github .seleniumquery .functions .jquery .manipulation .TextFunction ;
31
- import io .github .seleniumquery .functions .jquery .miscellaneous .GetFunction ;
32
- import io .github .seleniumquery .functions .jquery .miscellaneous .ToArrayFunction ;
33
- import io .github .seleniumquery .functions .jquery .traversing .filtering .*;
34
- import io .github .seleniumquery .functions .jquery .traversing .treetraversal .ChildrenFunction ;
35
- import io .github .seleniumquery .functions .jquery .traversing .treetraversal .ClosestFunction ;
36
- import io .github .seleniumquery .functions .jquery .traversing .treetraversal .FindFunction ;
37
- import io .github .seleniumquery .functions .jquery .traversing .treetraversal .ParentFunction ;
38
23
import io .github .seleniumquery .utils .ListUtils ;
39
24
import io .github .seleniumquery .wait .SeleniumQueryWaitUntil ;
40
25
import org .apache .commons .logging .Log ;
@@ -255,7 +240,7 @@ public int size() {
255
240
* @since 0.9.0
256
241
*/
257
242
public SeleniumQueryObject not (String selector ) {
258
- return NotFunction . not (this , selector );
243
+ return seleniumQueryFunctions . notSelector (this , selector );
259
244
}
260
245
261
246
/**
@@ -269,7 +254,7 @@ public SeleniumQueryObject not(String selector) {
269
254
* @since 0.9.0
270
255
*/
271
256
public SeleniumQueryObject first () {
272
- return FirstFunction .first (this );
257
+ return seleniumQueryFunctions .first (this );
273
258
}
274
259
275
260
/**
@@ -283,7 +268,7 @@ public SeleniumQueryObject first() {
283
268
* @since 0.9.0
284
269
*/
285
270
public SeleniumQueryObject last () {
286
- return LastFunction .last (this );
271
+ return seleniumQueryFunctions .last (this );
287
272
}
288
273
289
274
/**
@@ -297,7 +282,7 @@ public SeleniumQueryObject last() {
297
282
* @since 0.9.0
298
283
*/
299
284
public SeleniumQueryObject eq (int index ) {
300
- return EqFunction . eq (this , index );
285
+ return seleniumQueryFunctions . eqIndex (this , index );
301
286
}
302
287
303
288
/**
@@ -317,7 +302,7 @@ public String text() {
317
302
// It is impossible to read text from hidden elements in Selenium:
318
303
// Since a user cannot read text in a hidden element, WebDriver will not allow access to it as well.
319
304
// More in WebDriver FAQs: https://code.google.com/p/selenium/wiki/FrequentlyAskedQuestions#Q:_Why_is_it_not_possible_to_interact_with_hidden_elements?
320
- return TextFunction .text (this );
305
+ return seleniumQueryFunctions .text (this );
321
306
}
322
307
323
308
/**
@@ -329,7 +314,7 @@ public String text() {
329
314
* @since 0.9.0
330
315
*/
331
316
public SeleniumQueryObject click () {
332
- return ClickFunction .click (this );
317
+ return seleniumQueryFunctions .click (this );
333
318
}
334
319
335
320
/**
@@ -341,7 +326,7 @@ public SeleniumQueryObject click() {
341
326
* @since 0.9.0
342
327
*/
343
328
public SeleniumQueryObject val (String value ) {
344
- return seleniumQueryFunctions .valWrite (this , value );
329
+ return seleniumQueryFunctions .valueWrite (this , value );
345
330
}
346
331
347
332
/**
@@ -353,7 +338,7 @@ public SeleniumQueryObject val(String value) {
353
338
* @since 0.9.0
354
339
*/
355
340
public SeleniumQueryObject val (Number value ) {
356
- return seleniumQueryFunctions .valWrite (this , value );
341
+ return seleniumQueryFunctions .valueWrite (this , value );
357
342
}
358
343
359
344
/**
@@ -364,7 +349,7 @@ public SeleniumQueryObject val(Number value) {
364
349
* @since 0.9.0
365
350
*/
366
351
public String val () {
367
- return seleniumQueryFunctions .valRead (this );
352
+ return seleniumQueryFunctions .valueRead (this );
368
353
}
369
354
370
355
/**
@@ -388,7 +373,7 @@ public SeleniumQueryObject end() {
388
373
* @since 0.9.0
389
374
*/
390
375
public SeleniumQueryObject find (String selector ) {
391
- return FindFunction . find (this , selector );
376
+ return seleniumQueryFunctions . findSelector (this , selector );
392
377
}
393
378
394
379
/**
@@ -400,7 +385,7 @@ public SeleniumQueryObject find(String selector) {
400
385
* @since 0.9.0
401
386
*/
402
387
public String attr (String attributeName ) {
403
- return AttrFunction . attr (this , attributeName );
388
+ return seleniumQueryFunctions . attributeRead (this , attributeName );
404
389
}
405
390
406
391
/**
@@ -418,7 +403,7 @@ public String attr(String attributeName) {
418
403
* @since 0.9.0
419
404
*/
420
405
public SeleniumQueryObject attr (String attributeName , Object value ) {
421
- return AttrFunction . attr (this , attributeName , value );
406
+ return seleniumQueryFunctions . attributeWrite (this , attributeName , value );
422
407
}
423
408
424
409
/**
@@ -431,7 +416,7 @@ public SeleniumQueryObject attr(String attributeName, Object value) {
431
416
* @since 0.9.0
432
417
*/
433
418
public <T > T prop (String propertyName ) {
434
- return seleniumQueryFunctions .propRead (this , propertyName );
419
+ return seleniumQueryFunctions .propertyRead (this , propertyName );
435
420
}
436
421
437
422
/**
@@ -449,7 +434,7 @@ public <T> T prop(String propertyName) {
449
434
* @since 0.9.0
450
435
*/
451
436
public SeleniumQueryObject prop (String propertyName , Object value ) {
452
- return seleniumQueryFunctions .propWrite (this , propertyName , value );
437
+ return seleniumQueryFunctions .propertyWrite (this , propertyName , value );
453
438
}
454
439
455
440
/**
@@ -461,7 +446,7 @@ public SeleniumQueryObject prop(String propertyName, Object value) {
461
446
* @since 0.9.0
462
447
*/
463
448
public WebElement get (int index ) {
464
- return GetFunction . get (this , index );
449
+ return seleniumQueryFunctions . getIndex (this , index );
465
450
}
466
451
467
452
/**
@@ -485,7 +470,7 @@ public List<WebElement> get() {
485
470
* @since 0.9.0]
486
471
*/
487
472
public SeleniumQueryObject removeAttr (String attributeNames ) {
488
- return RemoveAttrFunction . removeAttr (this , attributeNames );
473
+ return seleniumQueryFunctions . removeAttribute (this , attributeNames );
489
474
}
490
475
491
476
/**
@@ -496,7 +481,7 @@ public SeleniumQueryObject removeAttr(String attributeNames) {
496
481
* @since 0.9.0
497
482
*/
498
483
public String html () {
499
- return HtmlFunction .html (this );
484
+ return seleniumQueryFunctions .html (this );
500
485
}
501
486
502
487
/**
@@ -509,7 +494,7 @@ public String html() {
509
494
* @since 0.9.0
510
495
*/
511
496
public boolean is (String selector ) {
512
- return seleniumQueryFunctions .isFunction (this , selector );
497
+ return seleniumQueryFunctions .isSelector (this , selector );
513
498
}
514
499
515
500
/**
@@ -521,7 +506,7 @@ public boolean is(String selector) {
521
506
* @since 0.9.0
522
507
*/
523
508
public boolean hasClass (String className ) {
524
- return HasClassFunction .hasClass (this , className );
509
+ return seleniumQueryFunctions .hasClass (this , className );
525
510
}
526
511
527
512
/**
@@ -532,7 +517,7 @@ public boolean hasClass(String className) {
532
517
* @since 0.9.0
533
518
*/
534
519
public WebElement [] toArray () {
535
- return ToArrayFunction .toArray (this );
520
+ return seleniumQueryFunctions .toArray (this );
536
521
}
537
522
538
523
/**
@@ -546,7 +531,7 @@ public WebElement[] toArray() {
546
531
* @since 0.9.0
547
532
*/
548
533
public SeleniumQueryObject closest (String selector ) {
549
- return ClosestFunction . closest (this , selector );
534
+ return seleniumQueryFunctions . closestSelector (this , selector );
550
535
}
551
536
552
537
/**
@@ -561,7 +546,7 @@ public SeleniumQueryObject closest(String selector) {
561
546
* @since 0.9.0
562
547
*/
563
548
public SeleniumQueryObject focus () {
564
- return FocusFunction .focus (this );
549
+ return seleniumQueryFunctions .focus (this );
565
550
}
566
551
567
552
/**
@@ -572,7 +557,7 @@ public SeleniumQueryObject focus() {
572
557
* @since 0.9.0
573
558
*/
574
559
public SeleniumQueryObject children () {
575
- return ChildrenFunction .children (this );
560
+ return seleniumQueryFunctions .children (this );
576
561
}
577
562
578
563
/**
@@ -584,7 +569,7 @@ public SeleniumQueryObject children() {
584
569
* @since 0.9.0
585
570
*/
586
571
public SeleniumQueryObject children (String selector ) {
587
- return ChildrenFunction . children (this , selector );
572
+ return seleniumQueryFunctions . childrenSelector (this , selector );
588
573
}
589
574
590
575
/**
@@ -597,7 +582,7 @@ public SeleniumQueryObject children(String selector) {
597
582
* @since 0.9.0
598
583
*/
599
584
public SeleniumQueryObject parent () {
600
- return ParentFunction .parent (this );
585
+ return seleniumQueryFunctions .parent (this );
601
586
}
602
587
603
588
/**
@@ -613,7 +598,7 @@ public SeleniumQueryObject parent() {
613
598
* @since 0.9.0
614
599
*/
615
600
public SeleniumQueryObject parent (String selector ) {
616
- return ParentFunction . parent (this , selector );
601
+ return seleniumQueryFunctions . parentSelector (this , selector );
617
602
}
618
603
619
604
/**
@@ -629,8 +614,7 @@ public SeleniumQueryObject parent(String selector) {
629
614
* @since 0.9.0
630
615
*/
631
616
public SeleniumQueryObject submit () {
632
- SubmitFunction .submit (this );
633
- return this ;
617
+ return seleniumQueryFunctions .submit (this );
634
618
}
635
619
636
620
/**
@@ -670,7 +654,7 @@ public String toString() {
670
654
* @since 0.11.0
671
655
*/
672
656
public SeleniumQueryObject filter (Predicate <WebElement > filterFunction ) {
673
- return seleniumQueryFunctions .filterFunction (this , filterFunction );
657
+ return seleniumQueryFunctions .filterPredicate (this , filterFunction );
674
658
}
675
659
676
660
}
0 commit comments