1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119<!DOCTYPE html> 120<html devsite> 121<head> 122 123 124 <meta name="top_category" value="develop" /> 125 126 <meta name="subcategory" value="reference" /> 127 128 129 <meta name="book_path" value="/reference/android/support/test/_book.yaml" /> 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145<title>Atoms</title> 146 147 148</head> 149 150<body class="gc-documentation develop reference api apilevel-"> 151<div id="doc-api-level" class="" style="display:none"></div> 152 153 154 155 156<div id="naMessage"></div> 157 158<div id="api-info-block"> 159<div class="api-level"> 160 161 162 163 164</div> 165 166 167 168 169 170 171 172 173 174 175 176<div class="sum-details-links"> 177 178Summary: 179 180 181 182 183 184 185 186 187 188 189 190 <a href="#pubmethods">Methods</a> 191 192 193 194 195 | <a href="#inhmethods">Inherited Methods</a> 196 197| <a href="#" onclick="return toggleAllClassInherited()" id="toggleAllClassInherited">[Expand All]</a> 198 199</div><!-- end sum-details-links --> 200</div><!-- end api-info-block --> 201 202<div class="api apilevel-" id="jd-content"> 203 204<!-- ======== START OF CLASS DATA ======== --> 205 206<h1 class="api-title">Atoms</h1> 207<p> 208<code class="api-signature"> 209 public 210 211 final 212 213 class 214 Atoms 215</code> 216<br> 217 218 219<code class="api-signature"> 220 221 extends Object 222 223 224 225</code> 226 227<code class="api-signature"> 228 229 230 231</code> 232 233</p><table class="jd-inheritance-table"> 234 235 236 <tr> 237 238 <td colspan="2" class="jd-inheritance-class-cell">java.lang.Object 239 </td> 240 </tr> 241 242 243 <tr> 244 245 <td class="jd-inheritance-space"> ↳</td> 246 247 <td colspan="1" class="jd-inheritance-class-cell">android.support.test.espresso.web.model.Atoms 248 </td> 249 </tr> 250 251 252</table> 253 254 255 256 257<br><hr> 258 259 260 <p>Utility class wrapping simple and more commonly used atoms. 261</p> 262 263 264 265 266 267 268 269<h2 class="api-section">Summary</h2> 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297<!-- ========== METHOD SUMMARY =========== --> 298<table id="pubmethods" class="responsive methods"> 299<tr><th colspan="2"><h3>Public methods</h3></th></tr> 300 301 302 303 304 <tr class="api apilevel-" > 305 306 307 <td><code> 308 309 310 static 311 312 <E> 313 <a href="/reference/android/support/test/espresso/web/model/TransformingAtom.Transformer.html">Transformer</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>, E></code> 314 </td> 315 316 <td width="100%"> 317 <code> 318 <a href="/reference/android/support/test/espresso/web/model/Atoms.html#castOrDie(java.lang.Class<E>)">castOrDie</a>(Class<E> clazz) 319 </code> 320 321 <p>Creates a transformer which will convert an Evaluation to a given type (or die trying). 322 323 324</p> 325 326 </td> 327 </tr> 328 329 330 331 <tr class="api apilevel-" > 332 333 334 <td><code> 335 336 337 static 338 339 340 <a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><String></code> 341 </td> 342 343 <td width="100%"> 344 <code> 345 <a href="/reference/android/support/test/espresso/web/model/Atoms.html#getCurrentUrl()">getCurrentUrl</a>() 346 </code> 347 348 <p>Returns the value of document.location.href. 349 350 351</p> 352 353 </td> 354 </tr> 355 356 357 358 <tr class="api apilevel-" > 359 360 361 <td><code> 362 363 364 static 365 366 367 <a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><String></code> 368 </td> 369 370 <td width="100%"> 371 <code> 372 <a href="/reference/android/support/test/espresso/web/model/Atoms.html#getTitle()">getTitle</a>() 373 </code> 374 375 <p>Returns the value of document.title. 376 377 378</p> 379 380 </td> 381 </tr> 382 383 384 385 <tr class="api apilevel-" > 386 387 388 <td><code> 389 390 391 static 392 393 394 <a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>></code> 395 </td> 396 397 <td width="100%"> 398 <code> 399 <a href="/reference/android/support/test/espresso/web/model/Atoms.html#script(java.lang.String)">script</a>(String script) 400 </code> 401 402 <p>Creates an atom that will execute the provided script and return an evaluation object. 403 404 405</p> 406 407 </td> 408 </tr> 409 410 411 412 <tr class="api apilevel-" > 413 414 415 <td><code> 416 417 418 static 419 420 <O> 421 <a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><O></code> 422 </td> 423 424 <td width="100%"> 425 <code> 426 <a href="/reference/android/support/test/espresso/web/model/Atoms.html#script(java.lang.String, android.support.test.espresso.web.model.TransformingAtom.Transformer<android.support.test.espresso.web.model.Evaluation, O>)">script</a>(String script, <a href="/reference/android/support/test/espresso/web/model/TransformingAtom.Transformer.html">Transformer</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>, O> transformer) 427 </code> 428 429 <p>Creates an atom that will execute the provided script and return an object created by the given 430 transformer. 431 432 433</p> 434 435 </td> 436 </tr> 437 438 439 440 <tr class="api apilevel-" > 441 442 443 <td><code> 444 445 446 static 447 448 449 <a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>></code> 450 </td> 451 452 <td width="100%"> 453 <code> 454 <a href="/reference/android/support/test/espresso/web/model/Atoms.html#scriptWithArgs(java.lang.String, java.util.List<? extends java.lang.Object>)">scriptWithArgs</a>(String script, List<? extends Object> args) 455 </code> 456 457 <p>Creates an atom that will execute the provided script with the given non-contextual arguments. 458 459 460</p> 461 462 </td> 463 </tr> 464 465 466 467 <tr class="api apilevel-" > 468 469 470 <td><code> 471 472 473 static 474 475 <I, O> 476 <a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><O></code> 477 </td> 478 479 <td width="100%"> 480 <code> 481 <a href="/reference/android/support/test/espresso/web/model/Atoms.html#transform(android.support.test.espresso.web.model.Atom<I>, android.support.test.espresso.web.model.TransformingAtom.Transformer<I, O>)">transform</a>(<a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><I> in, <a href="/reference/android/support/test/espresso/web/model/TransformingAtom.Transformer.html">Transformer</a><I, O> transformer) 482 </code> 483 484 <p>Creates an atom which wraps the input atom and transforms its output using the given 485 transformer. 486 487 488</p> 489 490 </td> 491 </tr> 492 493 494 495</table> 496 497 498 499 500 501 502 503<!-- ========== METHOD SUMMARY =========== --> 504<table id="inhmethods" class="methods inhtable"> 505<tr><th><h3>Inherited methods</h3></th></tr> 506 507 508<tr class="api apilevel-" > 509<td colspan="2"> 510 511 <a href="#" onclick="return toggleInherited(this, null)" id="inherited-methods-java.lang.Object" class="jd-expando-trigger closed" 512 ><img height="34" id="inherited-methods-java.lang.Object-trigger" 513 src="/assets/images/styles/disclosure_down.png" 514 class="jd-expando-trigger-img" /></a>From 515class 516<code> 517 518 java.lang.Object 519 520</code> 521<div id="inherited-methods-java.lang.Object"> 522 <div id="inherited-methods-java.lang.Object-list" 523 class="jd-inheritedlinks"> 524 </div> 525 <div id="inherited-methods-java.lang.Object-summary" style="display: none;"> 526 <table class="jd-sumtable-expando responsive"> 527 528 529 530 531 <tr class="api apilevel-" > 532 533 534 <td><code> 535 536 537 538 539 540 Object</code> 541 </td> 542 543 <td width="100%"> 544 <code> 545 clone() 546 </code> 547 548 </td> 549 </tr> 550 551 552 553 <tr class="api apilevel-" > 554 555 556 <td><code> 557 558 559 560 561 562 boolean</code> 563 </td> 564 565 <td width="100%"> 566 <code> 567 equals(Object arg0) 568 </code> 569 570 </td> 571 </tr> 572 573 574 575 <tr class="api apilevel-" > 576 577 578 <td><code> 579 580 581 582 583 584 void</code> 585 </td> 586 587 <td width="100%"> 588 <code> 589 finalize() 590 </code> 591 592 </td> 593 </tr> 594 595 596 597 <tr class="api apilevel-" > 598 599 600 <td><code> 601 602 603 604 final 605 606 Class<?></code> 607 </td> 608 609 <td width="100%"> 610 <code> 611 getClass() 612 </code> 613 614 </td> 615 </tr> 616 617 618 619 <tr class="api apilevel-" > 620 621 622 <td><code> 623 624 625 626 627 628 int</code> 629 </td> 630 631 <td width="100%"> 632 <code> 633 hashCode() 634 </code> 635 636 </td> 637 </tr> 638 639 640 641 <tr class="api apilevel-" > 642 643 644 <td><code> 645 646 647 648 final 649 650 void</code> 651 </td> 652 653 <td width="100%"> 654 <code> 655 notify() 656 </code> 657 658 </td> 659 </tr> 660 661 662 663 <tr class="api apilevel-" > 664 665 666 <td><code> 667 668 669 670 final 671 672 void</code> 673 </td> 674 675 <td width="100%"> 676 <code> 677 notifyAll() 678 </code> 679 680 </td> 681 </tr> 682 683 684 685 <tr class="api apilevel-" > 686 687 688 <td><code> 689 690 691 692 693 694 String</code> 695 </td> 696 697 <td width="100%"> 698 <code> 699 toString() 700 </code> 701 702 </td> 703 </tr> 704 705 706 707 <tr class="api apilevel-" > 708 709 710 <td><code> 711 712 713 714 final 715 716 void</code> 717 </td> 718 719 <td width="100%"> 720 <code> 721 wait(long arg0, int arg1) 722 </code> 723 724 </td> 725 </tr> 726 727 728 729 <tr class="api apilevel-" > 730 731 732 <td><code> 733 734 735 736 final 737 738 void</code> 739 </td> 740 741 <td width="100%"> 742 <code> 743 wait(long arg0) 744 </code> 745 746 </td> 747 </tr> 748 749 750 751 <tr class="api apilevel-" > 752 753 754 <td><code> 755 756 757 758 final 759 760 void</code> 761 </td> 762 763 <td width="100%"> 764 <code> 765 wait() 766 </code> 767 768 </td> 769 </tr> 770 771 772 773 </table> 774 </div> 775</div> 776</td></tr> 777 778 779</table> 780 781 782 783<!-- XML Attributes --> 784 785 786<!-- Enum Values --> 787 788 789<!-- Constants --> 790 791 792<!-- Fields --> 793 794 795<!-- Public ctors --> 796 797 798 799<!-- ========= CONSTRUCTOR DETAIL ======== --> 800<!-- Protected ctors --> 801 802 803 804<!-- ========= METHOD DETAIL ======== --> 805<!-- Public methdos --> 806 807<h2 class="api-section">Public methods</h2> 808 809 810 811<A NAME="castOrDie(java.lang.Class<E>)"></A> 812 813<div class="api apilevel-"> 814 <h3 class="api-name">castOrDie</h3> 815 <div class="api-level"> 816 <div></div> 817 818 819 820 </div> 821<pre class="api-signature no-pretty-print"> 822<a href="/reference/android/support/test/espresso/web/model/TransformingAtom.Transformer.html">Transformer</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>, E> castOrDie (Class<E> clazz)</pre> 823 824 825 826 827 <p>Creates a transformer which will convert an Evaluation to a given type (or die trying). 828</p> 829 <table class="responsive"> 830 <tr><th colspan=2>Parameters</th></tr> 831 <tr> 832 <td><code>clazz</code></td> 833 <td width="100%"> 834 <code>Class</code> 835 <!-- no parameter comment --></td> 836 </tr> 837 </table> 838 <table class="responsive"> 839 <tr><th colspan=2>Returns</th></tr> 840 <tr> 841 <td><code><a href="/reference/android/support/test/espresso/web/model/TransformingAtom.Transformer.html">Transformer</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>, E></code></td> 842 <td width="100%"><!-- no returns description in source --></td> 843 </tr> 844 </table> 845 846</div> 847 848 849<A NAME="getCurrentUrl()"></A> 850 851<div class="api apilevel-"> 852 <h3 class="api-name">getCurrentUrl</h3> 853 <div class="api-level"> 854 <div></div> 855 856 857 858 </div> 859<pre class="api-signature no-pretty-print"> 860<a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><String> getCurrentUrl ()</pre> 861 862 863 864 865 <p>Returns the value of document.location.href. 866</p> 867 <table class="responsive"> 868 <tr><th colspan=2>Returns</th></tr> 869 <tr> 870 <td><code><a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><String></code></td> 871 <td width="100%"><!-- no returns description in source --></td> 872 </tr> 873 </table> 874 875</div> 876 877 878<A NAME="getTitle()"></A> 879 880<div class="api apilevel-"> 881 <h3 class="api-name">getTitle</h3> 882 <div class="api-level"> 883 <div></div> 884 885 886 887 </div> 888<pre class="api-signature no-pretty-print"> 889<a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><String> getTitle ()</pre> 890 891 892 893 894 <p>Returns the value of document.title. 895</p> 896 <table class="responsive"> 897 <tr><th colspan=2>Returns</th></tr> 898 <tr> 899 <td><code><a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><String></code></td> 900 <td width="100%"><!-- no returns description in source --></td> 901 </tr> 902 </table> 903 904</div> 905 906 907<A NAME="script(java.lang.String)"></A> 908 909<div class="api apilevel-"> 910 <h3 class="api-name">script</h3> 911 <div class="api-level"> 912 <div></div> 913 914 915 916 </div> 917<pre class="api-signature no-pretty-print"> 918<a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>> script (String script)</pre> 919 920 921 922 923 <p>Creates an atom that will execute the provided script and return an evaluation object. 924</p> 925 <table class="responsive"> 926 <tr><th colspan=2>Parameters</th></tr> 927 <tr> 928 <td><code>script</code></td> 929 <td width="100%"> 930 <code>String</code> 931 <!-- no parameter comment --></td> 932 </tr> 933 </table> 934 <table class="responsive"> 935 <tr><th colspan=2>Returns</th></tr> 936 <tr> 937 <td><code><a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>></code></td> 938 <td width="100%"><!-- no returns description in source --></td> 939 </tr> 940 </table> 941 942</div> 943 944 945<A NAME="script(java.lang.String, android.support.test.espresso.web.model.TransformingAtom.Transformer<android.support.test.espresso.web.model.Evaluation, O>)"></A> 946 947<div class="api apilevel-"> 948 <h3 class="api-name">script</h3> 949 <div class="api-level"> 950 <div></div> 951 952 953 954 </div> 955<pre class="api-signature no-pretty-print"> 956<a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><O> script (String script, 957 <a href="/reference/android/support/test/espresso/web/model/TransformingAtom.Transformer.html">Transformer</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>, O> transformer)</pre> 958 959 960 961 962 <p>Creates an atom that will execute the provided script and return an object created by the given 963 transformer. 964</p> 965 <table class="responsive"> 966 <tr><th colspan=2>Parameters</th></tr> 967 <tr> 968 <td><code>script</code></td> 969 <td width="100%"> 970 <code>String</code> 971 <!-- no parameter comment --></td> 972 </tr> 973 <tr> 974 <td><code>transformer</code></td> 975 <td width="100%"> 976 <code>Transformer</code> 977 <!-- no parameter comment --></td> 978 </tr> 979 </table> 980 <table class="responsive"> 981 <tr><th colspan=2>Returns</th></tr> 982 <tr> 983 <td><code><a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><O></code></td> 984 <td width="100%"><!-- no returns description in source --></td> 985 </tr> 986 </table> 987 988</div> 989 990 991<A NAME="scriptWithArgs(java.lang.String, java.util.List<? extends java.lang.Object>)"></A> 992 993<div class="api apilevel-"> 994 <h3 class="api-name">scriptWithArgs</h3> 995 <div class="api-level"> 996 <div></div> 997 998 999 1000 </div> 1001<pre class="api-signature no-pretty-print"> 1002<a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>> scriptWithArgs (String script, 1003 List<? extends Object> args)</pre> 1004 1005 1006 1007 1008 <p>Creates an atom that will execute the provided script with the given non-contextual arguments. 1009</p> 1010 <table class="responsive"> 1011 <tr><th colspan=2>Parameters</th></tr> 1012 <tr> 1013 <td><code>script</code></td> 1014 <td width="100%"> 1015 <code>String</code> 1016 <!-- no parameter comment --></td> 1017 </tr> 1018 <tr> 1019 <td><code>args</code></td> 1020 <td width="100%"> 1021 <code>List</code> 1022 <!-- no parameter comment --></td> 1023 </tr> 1024 </table> 1025 <table class="responsive"> 1026 <tr><th colspan=2>Returns</th></tr> 1027 <tr> 1028 <td><code><a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><<a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a>></code></td> 1029 <td width="100%"><!-- no returns description in source --></td> 1030 </tr> 1031 </table> 1032 1033</div> 1034 1035 1036<A NAME="transform(android.support.test.espresso.web.model.Atom<I>, android.support.test.espresso.web.model.TransformingAtom.Transformer<I, O>)"></A> 1037 1038<div class="api apilevel-"> 1039 <h3 class="api-name">transform</h3> 1040 <div class="api-level"> 1041 <div></div> 1042 1043 1044 1045 </div> 1046<pre class="api-signature no-pretty-print"> 1047<a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><O> transform (<a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><I> in, 1048 <a href="/reference/android/support/test/espresso/web/model/TransformingAtom.Transformer.html">Transformer</a><I, O> transformer)</pre> 1049 1050 1051 1052 1053 <p>Creates an atom which wraps the input atom and transforms its output using the given 1054 transformer. 1055</p> 1056 <table class="responsive"> 1057 <tr><th colspan=2>Parameters</th></tr> 1058 <tr> 1059 <td><code>in</code></td> 1060 <td width="100%"> 1061 <code>Atom</code> 1062 <!-- no parameter comment --></td> 1063 </tr> 1064 <tr> 1065 <td><code>transformer</code></td> 1066 <td width="100%"> 1067 <code>Transformer</code> 1068 <!-- no parameter comment --></td> 1069 </tr> 1070 </table> 1071 <table class="responsive"> 1072 <tr><th colspan=2>Returns</th></tr> 1073 <tr> 1074 <td><code><a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a><O></code></td> 1075 <td width="100%"><!-- no returns description in source --></td> 1076 </tr> 1077 </table> 1078 1079</div> 1080 1081 1082 1083 1084 1085<!-- ========= METHOD DETAIL ======== --> 1086 1087 1088 1089<!-- ========= END OF CLASS DATA ========= --> 1090 1091</div><!-- end jd-content --> 1092 1093 1094 1095<div class="data-reference-resources-wrapper"> 1096 1097 <ul data-reference-resources> 1098 1099 1100 <li><h2>Interfaces</h2> 1101 <ul> 1102 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/Atom.html">Atom</a></li> 1103 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/JSONAble.html">JSONAble</a></li> 1104 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/JSONAble.DeJSONFactory.html">JSONAble.DeJSONFactory</a></li> 1105 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/TransformingAtom.Transformer.html">TransformingAtom.Transformer</a></li> 1106 </ul> 1107 </li> 1108 1109 <li><h2>Classes</h2> 1110 <ul> 1111 <li class="selected api apilevel-"><a href="/reference/android/support/test/espresso/web/model/Atoms.html">Atoms</a></li> 1112 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/ElementReference.html">ElementReference</a></li> 1113 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/Evaluation.html">Evaluation</a></li> 1114 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/ModelCodec.html">ModelCodec</a></li> 1115 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/SimpleAtom.html">SimpleAtom</a></li> 1116 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/TransformingAtom.html">TransformingAtom</a></li> 1117 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/WindowReference.html">WindowReference</a></li> 1118 </ul> 1119 </li> 1120 1121 <li><h2>Enums</h2> 1122 <ul> 1123 <li class="api apilevel-"><a href="/reference/android/support/test/espresso/web/model/SimpleAtom.ElementReferencePlacement.html">SimpleAtom.ElementReferencePlacement</a></li> 1124 </ul> 1125 </li> 1126 1127 1128 </ul> 1129 1130</div> 1131 1132 1133 1134</body> 1135</html> 1136