Best JavaScript code snippet using puppeteer
sidebars.js
Source:sidebars.js
1module.exports = {2 docs: {3 Puppeteer: [4 {5 type: 'doc',6 id: 'puppeteer.puppeteer',7 label: 'Puppeteer',8 },9 {10 Methods: [11 {12 type: 'doc',13 id: 'puppeteer.puppeteer.clearcustomqueryhandlers',14 label: 'clearcustomqueryhandlers',15 },16 {17 type: 'doc',18 id: 'puppeteer.puppeteer.connect',19 label: 'connect',20 },21 {22 type: 'doc',23 id: 'puppeteer.puppeteer.customqueryhandlernames',24 label: 'customqueryhandlersnames',25 },26 {27 type: 'doc',28 id: 'puppeteer.puppeteer.devices',29 label: 'devices',30 },31 {32 type: 'doc',33 id: 'puppeteer.puppeteer.errors',34 label: 'errors',35 },36 {37 type: 'doc',38 id: 'puppeteer.puppeteer.networkconditions',39 label: 'networkconditions',40 },41 {42 type: 'doc',43 id: 'puppeteer.puppeteer.registercustomqueryhandler',44 label: 'registercustomqueryhandler',45 },46 {47 type: 'doc',48 id: 'puppeteer.puppeteer.unregistercustomqueryhandler',49 label: 'unregistercustomqueryhandler',50 },51 ]52 }53 ],54 "BrowserFetcher": [55 {56 type: 'doc',57 id: 'puppeteer.browserfetcher',58 label: 'BrowserFetcher',59 },60 {61 Methods: [62 {63 type: 'doc',64 id: 'puppeteer.browserfetcher.candownload',65 label: 'candownload',66 },67 {68 type: 'doc',69 id: 'puppeteer.browserfetcher.download',70 label: 'download',71 },72 {73 type: 'doc',74 id: 'puppeteer.browserfetcher.host',75 label: 'host',76 },77 {78 type: 'doc',79 id: 'puppeteer.browserfetcher.localrevisions',80 label: 'localrevisions',81 },82 {83 type: 'doc',84 id: 'puppeteer.browserfetcher.platform',85 label: 'platform',86 },87 {88 type: 'doc',89 id: 'puppeteer.browserfetcher.product',90 label: 'product',91 },92 {93 type: 'doc',94 id: 'puppeteer.browserfetcher.remove',95 label: 'remove',96 },97 {98 type: 'doc',99 id: 'puppeteer.browserfetcher.revisioninfo',100 label: 'revisioninfo',101 },102 ]103 },104 ],105 "Browser": [106 {107 type: 'doc',108 id: 'puppeteer.browser',109 label: 'Browser',110 },111 {112 Methods: [113 {114 type: 'doc',115 id: 'puppeteer.browser.browsercontexts',116 label: 'browsercontexts',117 },118 {119 type: 'doc',120 id: 'puppeteer.browser.close',121 label: 'close',122 },123 {124 type: 'doc',125 id: 'puppeteer.browser.createincognitobrowsercontext',126 label: 'createincognitobrowsercontext',127 },128 {129 type: 'doc',130 id: 'puppeteer.browser.defaultbrowsercontext',131 label: 'defaultbrowsercontext',132 },133 {134 type: 'doc',135 id: 'puppeteer.browser.disconnect',136 label: 'disconnect',137 },138 {139 type: 'doc',140 id: 'puppeteer.browser.isconnected',141 label: 'isconnected',142 },143 {144 type: 'doc',145 id: 'puppeteer.browser.newpage',146 label: 'newpage',147 },148 {149 type: 'doc',150 id: 'puppeteer.browser.pages',151 label: 'pages',152 },153 {154 type: 'doc',155 id: 'puppeteer.browser.process',156 label: 'process',157 },158 {159 type: 'doc',160 id: 'puppeteer.browser.target',161 label: 'target',162 },163 {164 type: 'doc',165 id: 'puppeteer.browser.useragent',166 label: 'useragent',167 },168 {169 type: 'doc',170 id: 'puppeteer.browser.waitfortarget',171 label: 'waitfortarget',172 },173 {174 type: 'doc',175 id: 'puppeteer.browser.wsendpoint',176 label: 'wsendpoint',177 },178 ]179 },180 ],181 "BrowserContext": [182 {183 type: 'doc',184 id: 'puppeteer.browsercontext',185 label: 'BrowserContext',186 },187 {188 Methods: [189 {190 type: 'doc',191 id: 'puppeteer.browsercontext.browser',192 label: 'browser',193 },194 {195 type: 'doc',196 id: 'puppeteer.browsercontext.overridepermissions',197 label: 'overridepermissions',198 },199 {200 type: 'doc',201 id: 'puppeteer.browsercontext.close',202 label: 'close',203 },204 {205 type: 'doc',206 id: 'puppeteer.browsercontext.isincognito',207 label: 'isincognito',208 },209 {210 type: 'doc',211 id: 'puppeteer.browsercontext.newpage',212 label: 'newpage',213 },214 {215 type: 'doc',216 id: 'puppeteer.browsercontext.overridepermissions',217 label: 'overridepermissions',218 },219 {220 type: 'doc',221 id: 'puppeteer.browsercontext.pages',222 label: 'pages',223 },224 {225 type: 'doc',226 id: 'puppeteer.browsercontext.targets',227 label: 'targets',228 },229 {230 type: 'doc',231 id: 'puppeteer.browsercontext.waitfortarget',232 label: 'waitfortarget',233 },234 ]235 },236 ],237 "Page": [238 {239 type: 'doc',240 id: 'puppeteer.page',241 label: 'Page',242 },243 {244 Namespaces: [245 {246 type: 'doc',247 id: 'puppeteer.page.accessibility',248 label: 'accessibility',249 },250 {251 type: 'doc',252 id: 'puppeteer.page.coverage',253 label: 'coverage',254 },255 {256 type: 'doc',257 id: 'puppeteer.page.isdraginterceptionenabled',258 label: 'isDragInterceptionEnabled',259 },260 {261 type: 'doc',262 id: 'puppeteer.page.keyboard',263 label: 'keyboard',264 },265 {266 type: 'doc',267 id: 'puppeteer.page.mouse',268 label: 'mouse',269 },270 {271 type: 'doc',272 id: 'puppeteer.page.touchscreen',273 label: 'touchScreen',274 },275 {276 type: 'doc',277 id: 'puppeteer.page.tracing',278 label: 'tracing',279 },280 ]281 },282 {283 Methods: [284 {285 type: 'doc',286 id: 'puppeteer.page._',287 label: '$',288 },289 {290 type: 'doc',291 id: 'puppeteer.page.__',292 label: '$$',293 },294 {295 type: 'doc',296 id: 'puppeteer.page.__eval',297 label: '$$eval',298 },299 {300 type: 'doc',301 id: 'puppeteer.page._eval',302 label: '$eval',303 },304 {305 type: 'doc',306 id: 'puppeteer.page._x',307 label: '$x',308 },309 {310 type: 'doc',311 id: 'puppeteer.page.addscripttag',312 label: 'addScriptTag',313 },314 {315 type: 'doc',316 id: 'puppeteer.page.addstyletag',317 label: 'addStyleTag',318 },319 {320 type: 'doc',321 id: 'puppeteer.page.authenticate',322 label: 'authenticate',323 },324 {325 type: 'doc',326 id: 'puppeteer.page.bringtofront',327 label: 'bringToFront',328 },329 {330 type: 'doc',331 id: 'puppeteer.page.browser',332 label: 'browser',333 },334 {335 type: 'doc',336 id: 'puppeteer.page.browsercontext',337 label: 'browserContext',338 },339 {340 type: 'doc',341 id: 'puppeteer.page.click',342 label: 'click',343 },344 {345 type: 'doc',346 id: 'puppeteer.page.close',347 label: 'close',348 },349 {350 type: 'doc',351 id: 'puppeteer.page.content',352 label: 'content()',353 },354 {355 type: 'doc',356 id: 'puppeteer.page.cookies',357 label: 'cookies',358 },359 {360 type: 'doc',361 id: 'puppeteer.page.createpdfstream',362 label: 'createPDFStream',363 },364 {365 type: 'doc',366 id: 'puppeteer.page.deletecookie',367 label: 'deleteCookie',368 },369 {370 type: 'doc',371 id: 'puppeteer.page.emulate',372 label: 'emulate',373 },374 {375 type: 'doc',376 id: 'puppeteer.page.emulatecputhrottling',377 label: 'emulateCPUThrottling',378 },379 {380 type: 'doc',381 id: 'puppeteer.page.emulateidlestate',382 label: 'emulateIdleState',383 },384 {385 type: 'doc',386 id: 'puppeteer.page.emulatemediafeatures',387 label: 'emulateMediaFeatures',388 },389 {390 type: 'doc',391 id: 'puppeteer.page.emulatenetworkconditions',392 label: 'emulateNetworkConditions',393 },394 {395 type: 'doc',396 id: 'puppeteer.page.emulatetimezone',397 label: 'emulateTimeZone',398 },399 {400 type: 'doc',401 id: 'puppeteer.page.emulatevisiondeficiency',402 label: 'emulateVisionDefinciency',403 },404 {405 type: 'doc',406 id: 'puppeteer.page.evaluate',407 label: 'evaluate',408 },409 {410 type: 'doc',411 id: 'puppeteer.page.evaluatehandle',412 label: 'evaluateHandle',413 },414 {415 type: 'doc',416 id: 'puppeteer.page.evaluateonnewdocument',417 label: 'evaluateOnNewDocument',418 },419 {420 type: 'doc',421 id: 'puppeteer.page.exposefunction',422 label: 'exposeFunction',423 },424 {425 type: 'doc',426 id: 'puppeteer.page.focus',427 label: 'focus',428 },429 {430 type: 'doc',431 id: 'puppeteer.page.frames',432 label: 'frames',433 },434 {435 type: 'doc',436 id: 'puppeteer.page.goback',437 label: 'goBack',438 },439 {440 type: 'doc',441 id: 'puppeteer.page.goforward',442 label: 'goForward',443 },444 {445 type: 'doc',446 id: 'puppeteer.page.goto',447 label: 'goTo',448 },449 {450 type: 'doc',451 id: 'puppeteer.page.hover',452 label: 'hover',453 },454 {455 type: 'doc',456 id: 'puppeteer.page.isclosed',457 label: 'isClosed',458 },459 {460 type: 'doc',461 id: 'puppeteer.page.isjavascriptenabled',462 label: 'isJavaScriptEnbled',463 },464 {465 type: 'doc',466 id: 'puppeteer.page.mainframe',467 label: 'mainFrame',468 },469 {470 type: 'doc',471 id: 'puppeteer.page.metrics',472 label: 'metrics',473 },474 {475 type: 'doc',476 id: 'puppeteer.page.once',477 label: 'once',478 },479 {480 type: 'doc',481 id: 'puppeteer.page.pdf',482 label: 'PDF',483 },484 {485 type: 'doc',486 id: 'puppeteer.page.queryobjects',487 label: 'queryObjects',488 },489 {490 type: 'doc',491 id: 'puppeteer.page.reload',492 label: 'reload',493 },494 {495 type: 'doc',496 id: 'puppeteer.page.screenshot',497 label: 'screenshot',498 },499 {500 type: 'doc',501 id: 'puppeteer.page.select',502 label: 'select',503 },504 {505 type: 'doc',506 id: 'puppeteer.page.setbypasscsp',507 label: 'setByPassCSP',508 },509 {510 type: 'doc',511 id: 'puppeteer.page.setcacheenabled',512 label: 'setCacheEnaled',513 },514 {515 type: 'doc',516 id: 'puppeteer.page.setcontent',517 label: 'setContent',518 },519 {520 type: 'doc',521 id: 'puppeteer.page.setcookie',522 label: 'setCookie',523 },524 {525 type: 'doc',526 id: 'puppeteer.page.setdefaultnavigationtimeout',527 label: 'setDefaultNavigationTimeOut',528 },529 {530 type: 'doc',531 id: 'puppeteer.page.setdefaulttimeout',532 label: 'setDefaultTimeOut',533 },534 {535 type: 'doc',536 id: 'puppeteer.page.setdraginterception',537 label: 'setDragInterception',538 },539 {540 type: 'doc',541 id: 'puppeteer.page.setextrahttpheaders',542 label: 'setExtraHTTPHeader',543 },544 {545 type: 'doc',546 id: 'puppeteer.page.setgeolocation',547 label: 'setGeoLocation',548 },549 {550 type: 'doc',551 id: 'puppeteer.page.setjavascriptenabled',552 label: 'setJavaScriptEnabled',553 },554 {555 type: 'doc',556 id: 'puppeteer.page.setofflinemode',557 label: 'setOfflineMode',558 },559 {560 type: 'doc',561 id: 'puppeteer.page.setrequestinterception',562 label: 'setRequestInterception',563 },564 {565 type: 'doc',566 id: 'puppeteer.page.setuseragent',567 label: 'setUserAgent',568 },569 {570 type: 'doc',571 id: 'puppeteer.page.setviewport',572 label: 'setViewPort',573 },574 {575 type: 'doc',576 id: 'puppeteer.page.tap',577 label: 'tap',578 },579 {580 type: 'doc',581 id: 'puppeteer.page.target',582 label: 'target',583 },584 {585 type: 'doc',586 id: 'puppeteer.page.title',587 label: 'title',588 },589 {590 type: 'doc',591 id: 'puppeteer.page.type',592 label: 'type',593 },594 {595 type: 'doc',596 id: 'puppeteer.page.url',597 label: 'url',598 },599 {600 type: 'doc',601 id: 'puppeteer.page.viewport',602 label: 'viewport',603 },604 {605 type: 'doc',606 id: 'puppeteer.page.waitfor',607 label: 'waitFor',608 },609 {610 type: 'doc',611 id: 'puppeteer.page.waitforfilechooser',612 label: 'waitForFileChooser',613 },614 {615 type: 'doc',616 id: 'puppeteer.page.waitforfunction',617 label: 'waitForFunction',618 },619 {620 type: 'doc',621 id: 'puppeteer.page.waitfornavigation',622 label: 'waitForNavigation',623 },624 {625 type: 'doc',626 id: 'puppeteer.page.waitforrequest',627 label: 'waitForRequest',628 },629 {630 type: 'doc',631 id: 'puppeteer.page.waitforresponse',632 label: 'waitForResponse',633 },634 {635 type: 'doc',636 id: 'puppeteer.page.waitforselector',637 label: 'waitForSelector',638 },639 {640 type: 'doc',641 id: 'puppeteer.page.waitfortimeout',642 label: 'waittimeout',643 },644 {645 type: 'doc',646 id: 'puppeteer.page.waitforxpath',647 label: 'waitForXPath',648 },649 {650 type: 'doc',651 id: 'puppeteer.page.workers',652 label: 'workers',653 },654 ]655 },656 ],657 "WebWorker": [658 {659 type: 'doc',660 id: 'puppeteer.webworker',661 label: 'WebWorker',662 },663 {664 Methods: [665 {666 type: 'doc',667 id: 'puppeteer.webworker.evaluate',668 label: 'evaluate',669 },670 {671 type: 'doc',672 id: 'puppeteer.webworker.evaluatehandle',673 label: 'evaluatehandle',674 },675 {676 type: 'doc',677 id: 'puppeteer.webworker.executioncontext',678 label: 'executioncontext',679 },680 {681 type: 'doc',682 id: 'puppeteer.webworker.url',683 label: 'url',684 },685 ]686 },687 ],688 "Accessibility": [689 {690 type: 'doc',691 id: 'puppeteer.accessibility',692 label: 'Accessibility',693 },694 {695 Methods: [696 {697 type: 'doc',698 id: 'puppeteer.accessibility.snapshot',699 label: 'snapshot',700 },701 ]702 },703 ],704 "Keyboard": [705 {706 type: 'doc',707 id: 'puppeteer.keyboard',708 label: 'keyboard',709 },710 {711 Methods: [712 {713 type: 'doc',714 id: 'puppeteer.keyboard.down',715 label: 'down',716 },717 {718 type: 'doc',719 id: 'puppeteer.keyboard.press',720 label: 'press',721 },722 {723 type: 'doc',724 id: 'puppeteer.keyboard.sendcharacter',725 label: 'sendCharacter',726 },727 {728 type: 'doc',729 id: 'puppeteer.keyboard.type',730 label: 'type',731 },732 {733 type: 'doc',734 id: 'puppeteer.keyboard.up',735 label: 'up',736 },737 ]738 },739 ],740 "Mouse": [741 {742 type: 'doc',743 id: 'puppeteer.mouse',744 label: 'mouse',745 },746 {747 Methods: [748 {749 type: 'doc',750 id: 'puppeteer.mouse.click',751 label: 'click',752 },753 {754 type: 'doc',755 id: 'puppeteer.mouse.down',756 label: 'down',757 },758 {759 type: 'doc',760 id: 'puppeteer.mouse.drag',761 label: 'drag',762 },763 {764 type: 'doc',765 id: 'puppeteer.mouse.draganddrop',766 label: 'dragAndDrop',767 },768 {769 type: 'doc',770 id: 'puppeteer.mouse.dragenter',771 label: 'dragEnter',772 },773 {774 type: 'doc',775 id: 'puppeteer.mouse.dragover',776 label: 'dragOver',777 },778 {779 type: 'doc',780 id: 'puppeteer.mouse.drop',781 label: 'drop',782 },783 {784 type: 'doc',785 id: 'puppeteer.mouse.move',786 label: 'move',787 },788 {789 type: 'doc',790 id: 'puppeteer.mouse.up',791 label: 'up',792 },793 {794 type: 'doc',795 id: 'puppeteer.mouse.wheel',796 label: 'wheel',797 },798 ]799 },800 ],801 "TouchScreen": [802 {803 type: 'doc',804 id: 'puppeteer.touchscreen',805 label: 'touchScreen',806 },807 {808 Methods: [809 {810 type: 'doc',811 id: 'puppeteer.touchscreen.tap',812 label: 'tap'813 }814 ]815 },816 ],817 "Tracing": [818 {819 type: 'doc',820 id: 'puppeteer.tracing',821 label: 'Tracing',822 },823 {824 Methods: [825 {826 type: 'doc',827 id: 'puppeteer.tracing._client',828 label: 'client',829 },830 {831 type: 'doc',832 id: 'puppeteer.tracing._path',833 label: 'path',834 },835 {836 type: 'doc',837 id: 'puppeteer.tracing._recording',838 label: 'recording',839 },840 {841 type: 'doc',842 id: 'puppeteer.tracing.start',843 label: 'start',844 },845 {846 type: 'doc',847 id: 'puppeteer.tracing.stop',848 label: 'stop',849 },850 ]851 },852 ],853 "Dialog": [854 {855 type: 'doc',856 id: 'puppeteer.dialog',857 label: 'dialog',858 },859 {860 Methods: [861 {862 type: 'doc',863 id: 'puppeteer.dialog.accept',864 label: 'accept',865 },866 {867 type: 'doc',868 id: 'puppeteer.dialog.defaultvalue',869 label: 'defaultValue',870 },871 {872 type: 'doc',873 id: 'puppeteer.dialog.dismiss',874 label: 'dismiss',875 },876 {877 type: 'doc',878 id: 'puppeteer.dialog.message',879 label: 'message',880 },881 {882 type: 'doc',883 id: 'puppeteer.dialog.type',884 label: 'type',885 },886 ]887 },888 ],889 "ConsoleMessage": [890 {891 type: 'doc',892 id: 'puppeteer.consolemessage',893 label: 'consoleMessage',894 },895 {896 Methods: [897 {898 type: 'doc',899 id: 'puppeteer.consolemessage.args',900 label: 'args',901 },902 {903 type: 'doc',904 id: 'puppeteer.consolemessage.location',905 label: 'location',906 },907 {908 type: 'doc',909 id: 'puppeteer.consolemessage.stacktrace',910 label: 'stackTrace',911 },912 {913 type: 'doc',914 id: 'puppeteer.consolemessage.text',915 label: 'text',916 },917 {918 type: 'doc',919 id: 'puppeteer.consolemessage.type',920 label: 'type',921 },922 ]923 },924 ],925 "Frame": [926 {927 type: 'doc',928 id: 'puppeteer.frame',929 label: 'frame',930 },931 {932 Methods: [933 {934 type: 'doc',935 id: 'puppeteer.frame._',936 label: '$',937 },938 {939 type: 'doc',940 id: 'puppeteer.frame.__',941 label: '$$',942 },943 {944 type: 'doc',945 id: 'puppeteer.frame.__eval',946 label: '$$eval',947 },948 {949 type: 'doc',950 id: 'puppeteer.frame._eval',951 label: '$eval',952 },953 {954 type: 'doc',955 id: 'puppeteer.frame._x',956 label: '$x',957 },958 {959 type: 'doc',960 id: 'puppeteer.frame.addscripttag',961 label: 'addScriptTag',962 },963 {964 type: 'doc',965 id: 'puppeteer.frame.addstyletag',966 label: 'addStyleTag',967 },968 {969 type: 'doc',970 id: 'puppeteer.frame.childframes',971 label: 'childFrames',972 },973 {974 type: 'doc',975 id: 'puppeteer.frame.click',976 label: 'click',977 },978 {979 type: 'doc',980 id: 'puppeteer.frame.content',981 label: 'content',982 },983 {984 type: 'doc',985 id: 'puppeteer.frame.evaluate',986 label: 'evaluate',987 },988 {989 type: 'doc',990 id: 'puppeteer.frame.evaluatehandle',991 label: 'evaluateHandle',992 },993 {994 type: 'doc',995 id: 'puppeteer.frame.executioncontext',996 label: 'executionContext',997 },998 {999 type: 'doc',1000 id: 'puppeteer.frame.focus',1001 label: 'focus',1002 },1003 {1004 type: 'doc',1005 id: 'puppeteer.frame.goto',1006 label: 'goTo',1007 },1008 {1009 type: 'doc',1010 id: 'puppeteer.frame.hover',1011 label: 'hover',1012 },1013 {1014 type: 'doc',1015 id: 'puppeteer.frame.isdetached',1016 label: 'isDetached',1017 },1018 {1019 type: 'doc',1020 id: 'puppeteer.frame.name',1021 label: 'name',1022 },1023 {1024 type: 'doc',1025 id: 'puppeteer.frame.parentframe',1026 label: 'parentFrame',1027 },1028 {1029 type: 'doc',1030 id: 'puppeteer.frame.select',1031 label: 'select',1032 },1033 {1034 type: 'doc',1035 id: 'puppeteer.frame.setcontent',1036 label: 'setContent',1037 },1038 {1039 type: 'doc',1040 id: 'puppeteer.frame.tap',1041 label: 'tap',1042 },1043 {1044 type: 'doc',1045 id: 'puppeteer.frame.title',1046 label: 'title',1047 },1048 {1049 type: 'doc',1050 id: 'puppeteer.frame.type',1051 label: 'type',1052 },1053 {1054 type: 'doc',1055 id: 'puppeteer.frame.url',1056 label: 'url',1057 },1058 {1059 type: 'doc',1060 id: 'puppeteer.frame.waitfor',1061 label: 'waitFor',1062 },1063 {1064 type: 'doc',1065 id: 'puppeteer.frame.waitforfunction',1066 label: 'waitForFunction',1067 },1068 {1069 type: 'doc',1070 id: 'puppeteer.frame.waitfornavigation',1071 label: 'waitForNavigation',1072 },1073 {1074 type: 'doc',1075 id: 'puppeteer.frame.waitforselector',1076 label: 'waitForSelector',1077 },1078 {1079 type: 'doc',1080 id: 'puppeteer.frame.waitfortimeout',1081 label: 'waitForTimeOut',1082 },1083 {1084 type: 'doc',1085 id: 'puppeteer.frame.waitforxpath',1086 label: 'waitForXPath',1087 },1088 ]1089 }1090 ],1091 "FileChooser": [1092 {1093 type: 'doc',1094 id: 'puppeteer.filechooser',1095 label: 'FileChooser',1096 },1097 {1098 Methods: [1099 {1100 type: 'doc',1101 id: 'puppeteer.filechooser.accept',1102 label: 'accept',1103 },1104 {1105 type: 'doc',1106 id: 'puppeteer.filechooser.cancel',1107 label: 'cancel',1108 },1109 {1110 type: 'doc',1111 id: 'puppeteer.filechooser.ismultiple',1112 label: 'ismultiple',1113 },1114 ]1115 },1116 ],1117 "ExecutionContext": [1118 {1119 type: 'doc',1120 id: 'puppeteer.executioncontext',1121 label: 'executionContext',1122 },1123 {1124 Methods: [1125 {1126 type: 'doc',1127 id: 'puppeteer.executioncontext.evaluate',1128 label: 'evaluate',1129 },1130 {1131 type: 'doc',1132 id: 'puppeteer.executioncontext.evaluatehandle',1133 label: 'evaluateHandle',1134 },1135 {1136 type: 'doc',1137 id: 'puppeteer.executioncontext.frame',1138 label: 'frame',1139 },1140 {1141 type: 'doc',1142 id: 'puppeteer.executioncontext.queryobjects',1143 label: 'queryobjects',1144 },1145 ]1146 },1147 ],1148 "JSHandle": [1149 {1150 type: 'doc',1151 id: 'puppeteer.jshandle',1152 label: 'JSHandle',1153 },1154 {1155 Methods: [1156 {1157 type: 'doc',1158 id: 'puppeteer.jshandle.aselement',1159 label: 'asElement',1160 },1161 {1162 type: 'doc',1163 id: 'puppeteer.jshandle.dispose',1164 label: 'dispose',1165 },1166 {1167 type: 'doc',1168 id: 'puppeteer.jshandle.evaluate',1169 label: 'evaluate',1170 },1171 {1172 type: 'doc',1173 id: 'puppeteer.jshandle.evaluatehandle',1174 label: 'evaluateHandle',1175 },1176 {1177 type: 'doc',1178 id: 'puppeteer.jshandle.executioncontext',1179 label: 'executionContext',1180 },1181 {1182 type: 'doc',1183 id: 'puppeteer.jshandle.getproperties',1184 label: 'getProperties',1185 },1186 {1187 type: 'doc',1188 id: 'puppeteer.jshandle.getproperty',1189 label: 'getProperty',1190 },1191 {1192 type: 'doc',1193 id: 'puppeteer.jshandle.jsonvalue',1194 label: 'JSONValue',1195 },1196 ]1197 },1198 ],1199 "ElementHandle": [1200 {1201 type: 'doc',1202 id: 'puppeteer.elementhandle',1203 label: 'elementHandle',1204 },1205 {1206 Methods: [1207 {1208 type: 'doc',1209 id: 'puppeteer.elementhandle._',1210 label: '$',1211 },1212 {1213 type: 'doc',1214 id: 'puppeteer.elementhandle.__',1215 label: '$$',1216 },1217 {1218 type: 'doc',1219 id: 'puppeteer.elementhandle.__eval',1220 label: '$$eval',1221 },1222 {1223 type: 'doc',1224 id: 'puppeteer.elementhandle._eval',1225 label: '$eval',1226 },1227 {1228 type: 'doc',1229 id: 'puppeteer.elementhandle._x',1230 label: '$x',1231 },1232 {1233 type: 'doc',1234 id: 'puppeteer.elementhandle.aselement',1235 label: 'asElement',1236 },1237 {1238 type: 'doc',1239 id: 'puppeteer.elementhandle.boundingbox',1240 label: 'boundingBox',1241 },1242 {1243 type: 'doc',1244 id: 'puppeteer.elementhandle.boxmodel',1245 label: 'boxModel',1246 },1247 {1248 type: 'doc',1249 id: 'puppeteer.elementhandle.click',1250 label: 'click',1251 },1252 {1253 type: 'doc',1254 id: 'puppeteer.elementhandle.contentframe',1255 label: 'contentFrame',1256 },1257 {1258 type: 'doc',1259 id: 'puppeteer.elementhandle.focus',1260 label: 'focus',1261 },1262 {1263 type: 'doc',1264 id: 'puppeteer.elementhandle.hover',1265 label: 'hover',1266 },1267 {1268 type: 'doc',1269 id: 'puppeteer.elementhandle.clickablepoint',1270 label: 'clickablePoint',1271 },1272 {1273 type: 'doc',1274 id: 'puppeteer.elementhandle.drag',1275 label: 'drag',1276 },1277 {1278 type: 'doc',1279 id: 'puppeteer.elementhandle.draganddrop',1280 label: 'dragAndDrop',1281 },1282 {1283 type: 'doc',1284 id: 'puppeteer.elementhandle.dragenter',1285 label: 'dragEnter',1286 },1287 {1288 type: 'doc',1289 id: 'puppeteer.elementhandle.dragover',1290 label: 'dragOver',1291 },1292 {1293 type: 'doc',1294 id: 'puppeteer.elementhandle.drop',1295 label: 'drop',1296 },1297 {1298 type: 'doc',1299 id: 'puppeteer.elementhandle.isintersectingviewport',1300 label: 'isIntersectingViewPort',1301 },1302 {1303 type: 'doc',1304 id: 'puppeteer.elementhandle.press',1305 label: 'press',1306 },1307 {1308 type: 'doc',1309 id: 'puppeteer.elementhandle.screenshot',1310 label: 'screenshot',1311 },1312 {1313 type: 'doc',1314 id: 'puppeteer.elementhandle.select',1315 label: 'select',1316 },1317 {1318 type: 'doc',1319 id: 'puppeteer.elementhandle.tap',1320 label: 'tap',1321 },1322 {1323 type: 'doc',1324 id: 'puppeteer.elementhandle.type',1325 label: 'type',1326 },1327 {1328 type: 'doc',1329 id: 'puppeteer.elementhandle.uploadfile',1330 label: 'uploadFile',1331 },1332 ]1333 },1334 ],1335 "HTTPRequest": [1336 {1337 type: 'doc',1338 id: 'puppeteer.httprequest',1339 label: 'httpRequest',1340 },1341 {1342 Methods: [1343 {1344 type: 'doc',1345 id: 'puppeteer.httprequest.abort',1346 label: 'abort',1347 },1348 {1349 type: 'doc',1350 id: 'puppeteer.httprequest.aborterrorreason',1351 label: 'abortErrorReason',1352 },1353 {1354 type: 'doc',1355 id: 'puppeteer.httprequest.enqueueinterceptaction',1356 label: 'enqueueInterCeptaction',1357 },1358 {1359 type: 'doc',1360 id: 'puppeteer.httprequest.failure',1361 label: 'failure',1362 },1363 {1364 type: 'doc',1365 id: 'puppeteer.httprequest.finalizeinterceptions',1366 label: 'finalizeInterception',1367 },1368 {1369 type: 'doc',1370 id: 'puppeteer.httprequest.frame',1371 label: 'frame',1372 },1373 {1374 type: 'doc',1375 id: 'puppeteer.httprequest.headers',1376 label: 'headers',1377 },1378 {1379 type: 'doc',1380 id: 'puppeteer.httprequest.isnavigationrequest',1381 label: 'isNavigationRequest',1382 },1383 {1384 type: 'doc',1385 id: 'puppeteer.httprequest.method',1386 label: 'method',1387 },1388 {1389 type: 'doc',1390 id: 'puppeteer.httprequest.postdata',1391 label: 'postData',1392 },1393 {1394 type: 'doc',1395 id: 'puppeteer.httprequest.redirectchain',1396 label: 'redirectChain',1397 },1398 {1399 type: 'doc',1400 id: 'puppeteer.httprequest.resourcetype',1401 label: 'resourceType',1402 },1403 {1404 type: 'doc',1405 id: 'puppeteer.httprequest.respond',1406 label: 'respond',1407 },1408 {1409 type: 'doc',1410 id: 'puppeteer.httprequest.response',1411 label: 'response',1412 },1413 {1414 type: 'doc',1415 id: 'puppeteer.httprequest.responseforrequest',1416 label: 'responseForRequest',1417 },1418 {1419 type: 'doc',1420 id: 'puppeteer.httprequest.url',1421 label: 'hurl',1422 },1423 ]1424 },1425 ],1426 "HTTPRespose": [1427 {1428 type: 'doc',1429 id: 'puppeteer.httpresponse',1430 label: 'httpResponse',1431 },1432 {1433 Methods: [1434 {1435 type: 'doc',1436 id: 'puppeteer.httpresponse.buffer',1437 label: 'buffer',1438 },1439 {1440 type: 'doc',1441 id: 'puppeteer.httpresponse.frame',1442 label: 'frame',1443 },1444 {1445 type: 'doc',1446 id: 'puppeteer.httpresponse.fromcache',1447 label: 'fromCache',1448 },1449 {1450 type: 'doc',1451 id: 'puppeteer.httpresponse.fromserviceworker',1452 label: 'fromServiceWorker',1453 },1454 {1455 type: 'doc',1456 id: 'puppeteer.httpresponse.headers',1457 label: 'headers',1458 },1459 {1460 type: 'doc',1461 id: 'puppeteer.httpresponse.json',1462 label: 'JSON',1463 },1464 {1465 type: 'doc',1466 id: 'puppeteer.httpresponse.ok',1467 label: 'OK',1468 },1469 {1470 type: 'doc',1471 id: 'puppeteer.httpresponse.remoteaddress',1472 label: 'remoteAddress',1473 },1474 {1475 type: 'doc',1476 id: 'puppeteer.httpresponse.request',1477 label: 'request',1478 },1479 {1480 type: 'doc',1481 id: 'puppeteer.httpresponse.securitydetails',1482 label: 'securityDetails',1483 },1484 {1485 type: 'doc',1486 id: 'puppeteer.httpresponse.status',1487 label: 'status',1488 },1489 {1490 type: 'doc',1491 id: 'puppeteer.httpresponse.statustext',1492 label: 'statusText',1493 },1494 {1495 type: 'doc',1496 id: 'puppeteer.httpresponse.text',1497 label: 'text',1498 },1499 {1500 type: 'doc',1501 id: 'puppeteer.httpresponse.url',1502 label: 'URL',1503 },1504 ]1505 },1506 ],1507 "SecurityDetails": [1508 {1509 type: 'doc',1510 id: 'puppeteer.securitydetails',1511 label: 'securityDetails',1512 },1513 {1514 Methods: [1515 {1516 type: 'doc',1517 id: 'puppeteer.securitydetails.issuer',1518 label: 'issuer',1519 },1520 {1521 type: 'doc',1522 id: 'puppeteer.securitydetails.protocol',1523 label: 'protocol',1524 },1525 {1526 type: 'doc',1527 id: 'puppeteer.securitydetails.subjectalternativenames',1528 label: 'subjectAlternativeNames',1529 },1530 {1531 type: 'doc',1532 id: 'puppeteer.securitydetails.subjectname',1533 label: 'subjectName',1534 },1535 {1536 type: 'doc',1537 id: 'puppeteer.securitydetails.validfrom',1538 label: 'validFrom',1539 },1540 {1541 type: 'doc',1542 id: 'puppeteer.securitydetails.validto',1543 label: 'validTo',1544 },1545 ]1546 },1547 ],1548 "Target": [1549 {1550 type: 'doc',1551 id: 'puppeteer.target',1552 label: 'target',1553 },1554 {1555 Methods: [1556 {1557 type: 'doc',1558 id: 'puppeteer.target.browser',1559 label: 'browser',1560 },1561 {1562 type: 'doc',1563 id: 'puppeteer.target.browsercontext',1564 label: 'browserContext',1565 },1566 {1567 type: 'doc',1568 id: 'puppeteer.target.createcdpsession',1569 label: 'createCDPSSession',1570 },1571 {1572 type: 'doc',1573 id: 'puppeteer.target.opener',1574 label: 'opener',1575 },1576 {1577 type: 'doc',1578 id: 'puppeteer.target.page',1579 label: 'page',1580 },1581 {1582 type: 'doc',1583 id: 'puppeteer.target.type',1584 label: 'type',1585 },1586 {1587 type: 'doc',1588 id: 'puppeteer.target.url',1589 label: 'url',1590 },1591 {1592 type: 'doc',1593 id: 'puppeteer.target.worker',1594 label: 'worker',1595 },1596 ]1597 },1598 ],1599 "CDPSession": [1600 {1601 type: 'doc',1602 id: 'puppeteer.cdpsession',1603 label: 'CDPSession',1604 },1605 {1606 Methods: [1607 {1608 type: 'doc',1609 id: 'puppeteer.cdpsession.connection',1610 label: 'connection',1611 },1612 {1613 type: 'doc',1614 id: 'puppeteer.cdpsession.detach',1615 label: 'detach',1616 },1617 {1618 type: 'doc',1619 id: 'puppeteer.cdpsession.send',1620 label: 'send',1621 },1622 ]1623 },1624 ],1625 "Coverage": [1626 {1627 type: 'doc',1628 id: 'puppeteer.coverage',1629 label: 'coverage',1630 },1631 {1632 Methods: [1633 {1634 type: 'doc',1635 id: 'puppeteer.coverage.startcsscoverage',1636 label: 'startCSSCoverage',1637 },1638 {1639 type: 'doc',1640 id: 'puppeteer.coverage.startjscoverage',1641 label: 'startJSCoverage',1642 },1643 {1644 type: 'doc',1645 id: 'puppeteer.coverage.stopcsscoverage',1646 label: 'stopCSSCoverage',1647 },1648 {1649 type: 'doc',1650 id: 'puppeteer.coverage.stopjscoverage',1651 label: 'stopJSCoverage',1652 },1653 ]1654 },1655 ],1656 "TimeOutError": [1657 {1658 type: 'doc',1659 id: 'puppeteer.timeouterror',1660 label: 'timeOutError',1661 },1662 ],1663 "EventEmitter": [1664 {1665 type: 'doc',1666 id: 'puppeteer.eventemitter',1667 label: 'eventEmitter',1668 },1669 {1670 Methods: [1671 {1672 type: 'doc',1673 id: 'puppeteer.eventemitter.addlistener',1674 label: 'addListener',1675 },1676 {1677 type: 'doc',1678 id: 'puppeteer.eventemitter.emit',1679 label: 'emit',1680 },1681 {1682 type: 'doc',1683 id: 'puppeteer.eventemitter.listenercount',1684 label: 'listenerCount',1685 },1686 {1687 type: 'doc',1688 id: 'puppeteer.eventemitter.off',1689 label: 'off',1690 },1691 {1692 type: 'doc',1693 id: 'puppeteer.eventemitter.on',1694 label: 'on',1695 },1696 {1697 type: 'doc',1698 id: 'puppeteer.eventemitter.once',1699 label: 'once',1700 },1701 {1702 type: 'doc',1703 id: 'puppeteer.eventemitter.removelistener',1704 label: 'removeListener',1705 },{1706 type: 'doc',1707 id: 'puppeteer.eventemitter.removealllisteners',1708 label: 'removeAllListener',1709 },1710 ]1711 },1712 ],1713 },...
prognoz.pac
Source:prognoz.pac
1| package |2package := Package name: 'prognoz'.3package paxVersion: 1;4 basicComment: ''.5package classNames6 add: #StDatabase;7 add: #StImageDatabase;8 add: #StListComponent;9 add: #StLoggedInComponent;10 add: #StLoginComponent;11 add: #StMenuComponent;12 add: #StMessageComponent;13 add: #StRegisterComponent;14 add: #StRootTask;15 add: #StSession;16 add: #StTask;17 add: #StTaskEditor;18 add: #StToDoLibrary;19 add: #StUser;20 yourself.21package binaryGlobalNames: (Set new22 yourself).23package globalAliases: (Set new24 yourself).25package setPrerequisites: (IdentitySet new26 add: '..\..\Object Arts\Dolphin\Base\Dolphin';27 add: '..\..\Contributions\rko\Seaside-D7.0\Grease\Grease-Core';28 add: '..\..\Contributions\rko\Seaside-D7.0\Seaside\Seaside-Component';29 add: '..\..\Contributions\rko\Seaside-D7.0\Seaside\Seaside-Core';30 add: '..\..\Contributions\rko\Seaside-D7.0\Seaside\Seaside-Session';31 yourself).32package!33"Class Definitions"!34Object subclass: #StDatabase35 instanceVariableNames: ''36 classVariableNames: ''37 poolDictionaries: ''38 classInstanceVariableNames: ''!39Object subclass: #StTask40 instanceVariableNames: 'completed deadline taskDescription id taskName'41 classVariableNames: ''42 poolDictionaries: ''43 classInstanceVariableNames: ''!44Object subclass: #StUser45 instanceVariableNames: 'id userName email tasks password'46 classVariableNames: ''47 poolDictionaries: ''48 classInstanceVariableNames: ''!49WAFileLibrary subclass: #StToDoLibrary50 instanceVariableNames: ''51 classVariableNames: ''52 poolDictionaries: ''53 classInstanceVariableNames: ''!54WAComponent subclass: #StListComponent55 instanceVariableNames: 'items filterBlock sortBlock renderItemBlock'56 classVariableNames: ''57 poolDictionaries: ''58 classInstanceVariableNames: ''!59WAComponent subclass: #StLoggedInComponent60 instanceVariableNames: 'menuComponent listComponent taskEditor'61 classVariableNames: ''62 poolDictionaries: ''63 classInstanceVariableNames: ''!64WAComponent subclass: #StLoginComponent65 instanceVariableNames: 'email password messageComponent'66 classVariableNames: ''67 poolDictionaries: ''68 classInstanceVariableNames: ''!69WAComponent subclass: #StMenuComponent70 instanceVariableNames: 'entries'71 classVariableNames: ''72 poolDictionaries: ''73 classInstanceVariableNames: ''!74WAComponent subclass: #StMessageComponent75 instanceVariableNames: 'messageType messageString wasShown'76 classVariableNames: ''77 poolDictionaries: ''78 classInstanceVariableNames: ''!79WAComponent subclass: #StRegisterComponent80 instanceVariableNames: 'user repeatedPassword messageComponent'81 classVariableNames: ''82 poolDictionaries: ''83 classInstanceVariableNames: ''!84WAComponent subclass: #StTaskEditor85 instanceVariableNames: 'task'86 classVariableNames: ''87 poolDictionaries: ''88 classInstanceVariableNames: ''!89WATask subclass: #StRootTask90 instanceVariableNames: ''91 classVariableNames: ''92 poolDictionaries: ''93 classInstanceVariableNames: ''!94WASession subclass: #StSession95 instanceVariableNames: 'user database'96 classVariableNames: ''97 poolDictionaries: ''98 classInstanceVariableNames: ''!99StDatabase subclass: #StImageDatabase100 instanceVariableNames: ''101 classVariableNames: 'Users'102 poolDictionaries: ''103 classInstanceVariableNames: ''!104"Global Aliases"!105"Loose Methods"!106"End of package definition"!107"Source Globals"!108"Classes"!109StDatabase guid: (GUID fromString: '{9a91f9e9-3feb-4fb0-ad30-c530a29b6ca4}')!110StDatabase comment: ''!111!StDatabase categoriesForClass!Kernel-Objects! !112!StDatabase methodsFor!113connect114^ true!115connectionFailed116^ false!117disconnect118^ true! !119!StDatabase categoriesFor: #connect!public! !120!StDatabase categoriesFor: #connectionFailed!public! !121!StDatabase categoriesFor: #disconnect!public! !122StTask guid: (GUID fromString: '{78455b4d-6cd1-49d7-8a85-205262fd8c93}')!123StTask comment: ''!124!StTask categoriesForClass!Kernel-Objects! !125!StTask methodsFor!126completed127 ^completed!128completed: anObject129 completed := anObject!130deadline131 ^deadline!132deadline: anObject133 deadline := anObject!134hasBeenMissed135 ^self completed not and: [self deadline < Date today]!136id137 ^id!138id: anObject139 id := anObject!140initialize141 self142 deadline: Date tomorrow;143 taskName: 'èìÿ çàäà÷è';144 completed: false!145isPending146 ^self completed not and: [self deadline >= Date today]!147taskDescription148 ^taskDescription!149taskDescription: anObject150 taskDescription := anObject!151taskName152 ^taskName!153taskName: anObject154 taskName := anObject! !155!StTask categoriesFor: #completed!accessing!private! !156!StTask categoriesFor: #completed:!accessing!private! !157!StTask categoriesFor: #deadline!accessing!private! !158!StTask categoriesFor: #deadline:!accessing!private! !159!StTask categoriesFor: #hasBeenMissed!public! !160!StTask categoriesFor: #id!accessing!private! !161!StTask categoriesFor: #id:!accessing!private! !162!StTask categoriesFor: #initialize!public! !163!StTask categoriesFor: #isPending!public! !164!StTask categoriesFor: #taskDescription!accessing!private! !165!StTask categoriesFor: #taskDescription:!accessing!private! !166!StTask categoriesFor: #taskName!accessing!private! !167!StTask categoriesFor: #taskName:!accessing!private! !168!StTask class methodsFor!169new170 "Answer a new initialize instance of the receiver."171 ^super new initialize! !172!StTask class categoriesFor: #new!public! !173StUser guid: (GUID fromString: '{afa592d8-a34f-4c61-9b69-33e6c62736df}')!174StUser comment: ''!175!StUser categoriesForClass!Kernel-Objects! !176!StUser methodsFor!177addTask: aTask178 ^self tasks add: aTask!179email180 ^email!181email: anObject182 email := anObject!183id184 ^id!185id: anObject186 id := anObject!187initialize188 super initialize.189 self tasks: OrderedCollection new!190password191 ^password!192password: anObject193 password := anObject!194tasks195 ^tasks!196tasks: anObject197 tasks := anObject!198userName199 ^userName!200userName: anObject201 userName := anObject! !202!StUser categoriesFor: #addTask:!public! !203!StUser categoriesFor: #email!accessing!public! !204!StUser categoriesFor: #email:!accessing!public! !205!StUser categoriesFor: #id!accessing!public! !206!StUser categoriesFor: #id:!accessing!public! !207!StUser categoriesFor: #initialize!public! !208!StUser categoriesFor: #password!accessing!public! !209!StUser categoriesFor: #password:!accessing!public! !210!StUser categoriesFor: #tasks!accessing!public! !211!StUser categoriesFor: #tasks:!accessing!public! !212!StUser categoriesFor: #userName!accessing!public! !213!StUser categoriesFor: #userName:!accessing!public! !214!StUser class methodsFor!215hashPassword: aString216 ^aString isEmpty ifTrue: [0] ifFalse: [GRPlatform current secureHashFor: aString]!217new218 ^super new219 initialize;220 yourself! !221!StUser class categoriesFor: #hashPassword:!public! !222!StUser class categoriesFor: #new!public! !223StToDoLibrary guid: (GUID fromString: '{b9e8c43c-45d9-4ca1-9e6d-dfa74cd7d34c}')!224StToDoLibrary comment: ''!225!StToDoLibrary categoriesForClass!Seaside-Core-Libraries! !226!StToDoLibrary methodsFor!227selectorsToInclude228 ^#(#todoCss)!229todoCss230 ^'231body {232 font: normal 100% Arial, Helvetica, Verdana, sans-serif;233}234.generic {235 font-family: Geneva, Arial, Helvetica, sans-serif;236 font-style: normal;237 font-weight: normal;238 font-size: 14px;239 color : #663300;240 padding: 20px;241 margin-top: 20px;242 margin-left: 20px;243 border: 1px solid #663300;244 width: 500px;245}246.lightbox {247 background-color:#FFFFFF;248}249.errorMessage {250 background-color: #ffb0b0;251 border: 1px solid #ee0000;252 padding: 5px;253 margin-bottom: 10px;254}255.infoMessage {256 background-color: #fbffcc;257 border: 1px solid #eda33a;258 padding: 5px;259 margin-bottom: 10px;260}261.copyright {262 font-family: Geneva, Arial, Helvetica, sans-serif;263 font-size: 10px;264 font-style: normal;265 font-weight: normal;266 color: #663300;267 text-align: left;268 margin-left: 20px;269}270a {271 color : #663300;272 text-decoration: underline;273}'! !274!StToDoLibrary categoriesFor: #selectorsToInclude!public! !275!StToDoLibrary categoriesFor: #todoCss!public! !276!StToDoLibrary class methodsFor!277applicationName278 ^'ToDo Application'! !279!StToDoLibrary class categoriesFor: #applicationName!public! !280StListComponent guid: (GUID fromString: '{e03aeba8-011b-422b-8aa4-762764a26957}')!281StListComponent comment: ''!282!StListComponent categoriesForClass!Seaside-Component! !283!StListComponent methodsFor!284filterBlock285 ^filterBlock!286filterBlock: anObject287 filterBlock := anObject!288items289 ^items!290items: anObject291 items := anObject!292renderContentOn: html293 html table: 294 [(self sortBlock value: (self filterBlock value: self items))295 do: [:item | html tableRow: [self renderItemBlock value: item value: html]]]!296renderItemBlock297 ^renderItemBlock!298renderItemBlock: anObject299 renderItemBlock := anObject!300sortBlock301 ^sortBlock!302sortBlock: anObject303 sortBlock := anObject! !304!StListComponent categoriesFor: #filterBlock!accessing!public! !305!StListComponent categoriesFor: #filterBlock:!accessing!public! !306!StListComponent categoriesFor: #items!accessing!public! !307!StListComponent categoriesFor: #items:!accessing!public! !308!StListComponent categoriesFor: #renderContentOn:!public! !309!StListComponent categoriesFor: #renderItemBlock!accessing!public! !310!StListComponent categoriesFor: #renderItemBlock:!accessing!public! !311!StListComponent categoriesFor: #sortBlock!accessing!public! !312!StListComponent categoriesFor: #sortBlock:!accessing!public! !313StLoggedInComponent guid: (GUID fromString: '{d860d0a5-7abd-4a91-8513-9d502ff7dec6}')!314StLoggedInComponent comment: ''!315!StLoggedInComponent categoriesForClass!Seaside-Component! !316!StLoggedInComponent methodsFor!317children318 ^Array with: self menuComponent with: self listComponent!319createNewTask320 (self call: self taskEditor newTask) ifFalse: [^self].321 self session database addTask: self taskEditor task toUser: self session user!322editTask: aTask323 self taskEditor task: aTask copy.324 (self call: self taskEditor) ifFalse: [^self].325 aTask copyFrom: self taskEditor task.326 self session database updateTask: aTask!327initialize328 super initialize.329 self initializeMenuComponent.330 self initializeListComponent.331 self taskEditor: StTaskEditor new.!332initializeListComponent333 self listComponent: StListComponent new.334 "self listComponent items: self testTasks."335 self listComponent336 sortBlock: [:items | items sort: [:a :b | a deadline < b deadline]];337 renderItemBlock: [:task :html | self renderTask: task asRowOn: html];338 items: self session user tasks.339 self showPendingTasks!340initializeMenuComponent341 self menuComponent: (StMenuComponent new342 addEntry: 'All' withAction: [self showAllTasks];343 addEntry: 'Completed' withAction: [self showCompletedTasks];344 addEntry: 'Pending' withAction: [self showPendingTasks];345 addEntry: 'Missed' withAction: [self showMissedTasks]; 346 addEntry: 'New Task' withAction: [self createNewTask];347 addEntry: 'Logout' withAction: [self session logout. self answer: true]; 348 yourself)!349listComponent350 ^listComponent!351listComponent: anObject352 listComponent := anObject!353menuComponent354 ^menuComponent!355menuComponent: anObject356 menuComponent := anObject!357renderContentOn: html358 "I render everything by calling html"359 html div360 class: 'generic';361 with: 362 [html heading: 'ToDo-List of ' , self session user userName.363 html div364 class: 'menu';365 with: self menuComponent.366 html div367 class: 'list';368 id: 'list';369 with: self listComponent]!370renderTask: aTask asRowOn: html371 html372 tableData: aTask deadline displayString;373 tableData: aTask taskName;374 tableData: aTask taskDescription;375 tableData: aTask completed displayString;376 tableData: [html anchor377 callback: [self editTask: aTask];378 with: 'edit']!379showAllTasks380 self listComponent filterBlock: [:items | items]!381showCompletedTasks382 self listComponent filterBlock: [:items | items select: [:item | item completed]]!383showMissedTasks384 self listComponent filterBlock: [:items | items select: [:item | item hasBeenMissed]]!385showPendingTasks386 self listComponent filterBlock: [:items | items select: [:item | item isPending]]!387taskEditor388 ^taskEditor!389taskEditor: anObject390 taskEditor := anObject!391testTasks392 ^OrderedCollection393 with: (StTask new394 deadline: Date yesterday;395 completed: false;396 taskName: 'Missed task')397 with: (StTask new398 deadline: Date tomorrow;399 completed: false;400 taskName: 'Pending task')401 with: (StTask new402 deadline: Date tomorrow;403 completed: true;404 taskName: 'Already completed task')! !405!StLoggedInComponent categoriesFor: #children!public! !406!StLoggedInComponent categoriesFor: #createNewTask!public! !407!StLoggedInComponent categoriesFor: #editTask:!public! !408!StLoggedInComponent categoriesFor: #initialize!public! !409!StLoggedInComponent categoriesFor: #initializeListComponent!public! !410!StLoggedInComponent categoriesFor: #initializeMenuComponent!initializing!public! !411!StLoggedInComponent categoriesFor: #listComponent!accessing!private! !412!StLoggedInComponent categoriesFor: #listComponent:!accessing!private! !413!StLoggedInComponent categoriesFor: #menuComponent!accessing!private! !414!StLoggedInComponent categoriesFor: #menuComponent:!accessing!private! !415!StLoggedInComponent categoriesFor: #renderContentOn:!public! !416!StLoggedInComponent categoriesFor: #renderTask:asRowOn:!public! !417!StLoggedInComponent categoriesFor: #showAllTasks!public! !418!StLoggedInComponent categoriesFor: #showCompletedTasks!public! !419!StLoggedInComponent categoriesFor: #showMissedTasks!public! !420!StLoggedInComponent categoriesFor: #showPendingTasks!public! !421!StLoggedInComponent categoriesFor: #taskEditor!accessing!private! !422!StLoggedInComponent categoriesFor: #taskEditor:!accessing!private! !423!StLoggedInComponent categoriesFor: #testTasks!public! !424!StLoggedInComponent class methodsFor!425canBeRoot426^ true! !427!StLoggedInComponent class categoriesFor: #canBeRoot!public! !428StLoginComponent guid: (GUID fromString: '{d37970d2-8002-473d-ba12-9aa6b3d06a8e}')!429StLoginComponent comment: ''!430!StLoginComponent categoriesForClass!Seaside-Component! !431!StLoginComponent methodsFor!432applicationName433 ^StToDoLibrary applicationName!434email435 ^email!436email: anObject437 email := anObject!438initialize439 super initialize.440 self messageComponent: StMessageComponent new.441 !442loginFailed443 self messageComponent errorMessage: 'Login failed.'!444messageComponent445 ^messageComponent!446messageComponent: anObject447 messageComponent := anObject!448password449 ^password!450password: anObject451 password := anObject!452registerUser453 self answer: #registerUser!454renderContentOn: html455 html div456 class: 'generic';457 with: 458 [html459 heading: self applicationName;460 render: self messageComponent;461 text: 'Please login with e-mail and password:';462 form: 463 [self464 renderTextInputOn: html;465 renderPasswordInputOn: html;466 renderLoginButtonOn: html;467 renderSignUpAnchorOn: html]]!468renderLoginButtonOn: html469 html submitButton470 callback: [self validateLogin];471 text: 'Login'!472renderPasswordInputOn: html473 html passwordInput474 callback: [:value | self password: (StUser hashPassword: value)];475 value: ''!476renderSignUpAnchorOn: html477 html paragraph with: 478 [html anchor479 callback: [self registerUser];480 with: [html text: 'Sign up for the ' , self applicationName]]!481renderTextInputOn: html482 html textInput483 on: #email of: self;484 value: ''.485 html space!486validateLogin487 | user |488 user := self session findUserByEmail: self email.489 (user notNil and: [user password = self password])490 ifTrue: [self answer: user]491 ifFalse: [self loginFailed]! !492!StLoginComponent categoriesFor: #applicationName!public! !493!StLoginComponent categoriesFor: #email!accessing!public! !494!StLoginComponent categoriesFor: #email:!accessing!public! !495!StLoginComponent categoriesFor: #initialize!public! !496!StLoginComponent categoriesFor: #loginFailed!public! !497!StLoginComponent categoriesFor: #messageComponent!accessing!public! !498!StLoginComponent categoriesFor: #messageComponent:!accessing!public! !499!StLoginComponent categoriesFor: #password!accessing!public! !500!StLoginComponent categoriesFor: #password:!accessing!public! !501!StLoginComponent categoriesFor: #registerUser!public! !502!StLoginComponent categoriesFor: #renderContentOn:!public! !503!StLoginComponent categoriesFor: #renderLoginButtonOn:!public! !504!StLoginComponent categoriesFor: #renderPasswordInputOn:!public! !505!StLoginComponent categoriesFor: #renderSignUpAnchorOn:!public! !506!StLoginComponent categoriesFor: #renderTextInputOn:!public! !507!StLoginComponent categoriesFor: #validateLogin!public! !508!StLoginComponent class methodsFor!509new510 ^super new initialize! !511!StLoginComponent class categoriesFor: #new!public! !512StMenuComponent guid: (GUID fromString: '{eafb50c4-a7ca-4485-91bb-b89ead98c1ee}')!513StMenuComponent comment: ''!514!StMenuComponent categoriesForClass!Seaside-Component! !515!StMenuComponent methodsFor!516addEntry: aString withAction: aBlock517 ^self entries add: aString -> aBlock!518entries519 ^entries!520entries: anObject521 entries := anObject!522initialize523 super initialize.524 entries := OrderedCollection new!525renderContentOn: html526 self entries do: 527 [:entry |528 html anchor529 callback: entry value;530 with: entry key]531 separatedBy: [html space]! !532!StMenuComponent categoriesFor: #addEntry:withAction:!public! !533!StMenuComponent categoriesFor: #entries!accessing!private! !534!StMenuComponent categoriesFor: #entries:!accessing!private! !535!StMenuComponent categoriesFor: #initialize!public! !536!StMenuComponent categoriesFor: #renderContentOn:!public! !537StMessageComponent guid: (GUID fromString: '{2d42d46b-40df-425c-ac06-47154537278f}')!538StMessageComponent comment: ''!539!StMessageComponent categoriesForClass!Seaside-Component! !540!StMessageComponent methodsFor!541errorMessage: aString542 self543 messageString: aString;544 messageType: 'error';545 wasShown: false!546infoMessage: aString547 self548 messageString: aString;549 messageType: 'info';550 wasShown: false!551initialize552 super initialize.553 self wasShown: true!554messageString555 ^messageString!556messageString: anObject557 messageString := anObject!558messageType559 ^messageType!560messageType: anObject561 messageType := anObject!562renderContentOn: html563 self wasShown ifTrue: [^self].564 html div565 class: self messageType , 'Message';566 with: self messageString.567 self wasShown: true!568wasShown569 ^wasShown!570wasShown: anObject571 wasShown := anObject! !572!StMessageComponent categoriesFor: #errorMessage:!public! !573!StMessageComponent categoriesFor: #infoMessage:!public! !574!StMessageComponent categoriesFor: #initialize!public! !575!StMessageComponent categoriesFor: #messageString!accessing!public! !576!StMessageComponent categoriesFor: #messageString:!accessing!public! !577!StMessageComponent categoriesFor: #messageType!accessing!public! !578!StMessageComponent categoriesFor: #messageType:!accessing!public! !579!StMessageComponent categoriesFor: #renderContentOn:!public! !580!StMessageComponent categoriesFor: #wasShown!accessing!public! !581!StMessageComponent categoriesFor: #wasShown:!accessing!public! !582!StMessageComponent class methodsFor!583new584 ^super new585 initialize;586 yourself! !587!StMessageComponent class categoriesFor: #new!public! !588StRegisterComponent guid: (GUID fromString: '{4b3420b5-83a8-40e9-8636-1dcdc370f07d}')!589StRegisterComponent comment: ''!590!StRegisterComponent categoriesForClass!Seaside-Component! !591!StRegisterComponent methodsFor!592initialize593 super initialize.594 self messageComponent: StMessageComponent new.595 self user: StUser new!596messageComponent597 ^messageComponent!598messageComponent: anObject 599 messageComponent := anObject!600registerUser 601 self user userName isEmptyOrNil602 ifTrue: [^self messageComponent infoMessage: 'Please choose a username!!'].603 self user email isEmptyOrNil604 ifTrue: [^self messageComponent infoMessage: 'Please enter your e-mail address!!'].605 (self session findUserByEmail: self user email)606 ifNotNil: [^self messageComponent errorMessage: 'The e-mail address is already registered!!'].607 self user password = 0 ifTrue: [^self messageComponent infoMessage: 'Please choose a password!!'].608 self user password = self repeatedPassword609 ifFalse: [^self messageComponent infoMessage: 'Your repeated password does not match!!'].610 611 self session database addUser: self user.612 self answer: self user!613renderCancelButtonOn: html614 html submitButton615 callback: [self answer: nil];616 text: 'Cancel'!617renderContentOn: html618 html div619 class: 'generic';620 with: 621 [html622 heading: 'Register';623 render: self messageComponent;624 form: 625 [html table: 626 [self627 renderUsernameTextInputOn: html;628 renderEmailTextInputOn: html;629 renderPasswordTextInputOn: html;630 renderRepeatedPasswordTextInputOn: html.631 html tableRow: 632 [html633 tableData;634 tableData: 635 [self renderSubmitButtonOn: html.636 html space.637 self renderCancelButtonOn: html]]]]]!638renderEmailTextInputOn: html639 html tableRow: 640 [html641 tableData: 'E-mail';642 tableData: 643 [html textInput644 callback: [:value | self user email: value];645 value: self user email]]!646renderPasswordTextInputOn: html647 html tableRow: 648 [html649 tableData: 'Password';650 tableData: [html passwordInput callback: [:value | self user password: (StUser hashPassword: value)]]]!651renderRepeatedPasswordTextInputOn: html652 html tableRow: 653 [html654 tableData: 'Repeat password';655 tableData: 656 [html passwordInput callback: [:value | self repeatedPassword: (StUser hashPassword: value)]]]!657renderSubmitButtonOn: html658 html submitButton659 callback: [self registerUser];660 text: 'Register'!661renderUsernameTextInputOn: html662 html tableRow: 663 [html664 tableData: 'Username';665 tableData: 666 [html textInput667 callback: [:value | self user userName: value];668 value: self user userName]]!669repeatedPassword670 ^repeatedPassword!671repeatedPassword: anObject672 repeatedPassword := anObject!673user674 ^user!675user: anObject676 user := anObject! !677!StRegisterComponent categoriesFor: #initialize!public! !678!StRegisterComponent categoriesFor: #messageComponent!accessing!public! !679!StRegisterComponent categoriesFor: #messageComponent:!accessing!public! !680!StRegisterComponent categoriesFor: #registerUser!public! !681!StRegisterComponent categoriesFor: #renderCancelButtonOn:!public! !682!StRegisterComponent categoriesFor: #renderContentOn:!public! !683!StRegisterComponent categoriesFor: #renderEmailTextInputOn:!public! !684!StRegisterComponent categoriesFor: #renderPasswordTextInputOn:!public! !685!StRegisterComponent categoriesFor: #renderRepeatedPasswordTextInputOn:!public! !686!StRegisterComponent categoriesFor: #renderSubmitButtonOn:!public! !687!StRegisterComponent categoriesFor: #renderUsernameTextInputOn:!public! !688!StRegisterComponent categoriesFor: #repeatedPassword!accessing!private! !689!StRegisterComponent categoriesFor: #repeatedPassword:!accessing!private! !690!StRegisterComponent categoriesFor: #user!accessing!public! !691!StRegisterComponent categoriesFor: #user:!accessing!public! !692StTaskEditor guid: (GUID fromString: '{72cbfcec-3e1d-4f1c-b571-8c1982af6bd3}')!693StTaskEditor comment: ''!694!StTaskEditor categoriesForClass!Seaside-Component! !695!StTaskEditor methodsFor!696newTask697 self task: StTask new!698renderButtonsOn: html699 html700 tableData;701 tableData: 702 [html submitButton703 callback: [self answer: true];704 value: 'Save'.705 html submitButton706 callback: [self answer: false];707 value: 'Cancel']!708renderCompletedSelectionOn: html709 html710 tableData: [html text: 'Completed: '];711 tableData: 712 [html select713 add: true;714 add: false;715 on: #completed of: self task;716 labels: [:value | value ifTrue: ['yes'] ifFalse: ['no']]]!717renderContentOn: html718 html div719 class: 'redmond';720 with: 721 [html heading: 'Editing task'.722 html form: 723 [html table: 724 [html725 tableRow: [self renderNameInputOn: html];726 tableRow: [self renderDescriptionInputOn: html];727 tableRow: [self renderDateInputOn: html];728 tableRow: [self renderCompletedSelectionOn: html];729 tableRow: [self renderButtonsOn: html]]]]!730renderDateInputOn: html731 html732 tableData: [html text: 'Deadline: '];733 tableData: [html dateInput on: #deadline of: self task]!734renderDescriptionInputOn: html735 html736 tableData: [html text: 'Description: '];737 tableData: [html textArea on: #taskDescription of: self task]!738renderNameInputOn: html739 html740 tableData: [html text: 'Name: '];741 tableData: [html textInput on: #taskName of: self task]!742task743 ^task!744task: anObject745 task := anObject! !746!StTaskEditor categoriesFor: #newTask!public! !747!StTaskEditor categoriesFor: #renderButtonsOn:!public! !748!StTaskEditor categoriesFor: #renderCompletedSelectionOn:!public! !749!StTaskEditor categoriesFor: #renderContentOn:!public! !750!StTaskEditor categoriesFor: #renderDateInputOn:!public! !751!StTaskEditor categoriesFor: #renderDescriptionInputOn:!public! !752!StTaskEditor categoriesFor: #renderNameInputOn:!public! !753!StTaskEditor categoriesFor: #task!accessing!public! !754!StTaskEditor categoriesFor: #task:!accessing!public! !755StRootTask guid: (GUID fromString: '{1d2b3056-e6bd-40fc-b334-d93a98ab4a67}')!756StRootTask comment: ''!757!StRootTask categoriesForClass!Seaside-Component-Tasks! !758!StRootTask methodsFor!759go760 | loginAnswer user |761 loginAnswer := self call: StLoginComponent new.762 loginAnswer = #registerUser763 ifTrue: [user := self call: StRegisterComponent new]764 ifFalse: [user := loginAnswer].765 user766 ifNotNil: 767 [self session login: user.768 self call: StLoggedInComponent new]! !769!StRootTask categoriesFor: #go!public! !770!StRootTask class methodsFor!771canBeRoot772 ^ true! !773!StRootTask class categoriesFor: #canBeRoot!public! !774StSession guid: (GUID fromString: '{65a6142e-8cd8-45dd-bb14-7b23e66504a0}')!775StSession comment: ''!776!StSession categoriesForClass!Seaside-Component! !777!StSession methodsFor!778database779 ^database!780database: anObject781 database := anObject!782findUserByEmail: anEmail783 ^self database findUserByEmail: anEmail!784initialize785 super initialize.786 self database: StImageDatabase new!787isLoggedIn788 ^self user notNil!789login: aUser790 self user: aUser!791logout792 self user: nil!793responseForRequest: aRequest794 self database connectionFailed ifTrue: [^WAResponse new nextPutAll: 'No Database Connection'].795 ^super responseForRequest: aRequest!796unregistered797 self database disconnect.798 super unregistered!799updateRoot: anHtmlRoot800 super updateRoot: anHtmlRoot.801 anHtmlRoot title: StToDoLibrary applicationName!802user803 ^user!804user: anObject805 user := anObject! !806!StSession categoriesFor: #database!accessing!public! !807!StSession categoriesFor: #database:!accessing!public! !808!StSession categoriesFor: #findUserByEmail:!public! !809!StSession categoriesFor: #initialize!public! !810!StSession categoriesFor: #isLoggedIn!public! !811!StSession categoriesFor: #login:!public! !812!StSession categoriesFor: #logout!public! !813!StSession categoriesFor: #responseForRequest:!public! !814!StSession categoriesFor: #unregistered!public! !815!StSession categoriesFor: #updateRoot:!public! !816!StSession categoriesFor: #user!accessing!public! !817!StSession categoriesFor: #user:!accessing!public! !818StImageDatabase guid: (GUID fromString: '{9a9f9250-d947-4762-ad3f-cc5859edf87a}')!819StImageDatabase comment: 'self Users removeAtIndex: 1820'!821!StImageDatabase categoriesForClass!Kernel-Objects! !822!StImageDatabase methodsFor!823addTask: aTask toUser: aUser824 aUser addTask: aTask.825 self saveImage.826 ^aTask!827addUser: aUser828 self class users add: aUser.829 self saveImage.830 ^aUser!831findUserByEmail: anEmail832 ^self class users detect: [:each | each email = anEmail] ifNone: [nil]!833saveImage834 "self class writeMutex critical: [self saveImageWithoutMonitor]."835 !836updateTask: aTask837 self saveImage! !838!StImageDatabase categoriesFor: #addTask:toUser:!public! !839!StImageDatabase categoriesFor: #addUser:!public! !840!StImageDatabase categoriesFor: #findUserByEmail:!public! !841!StImageDatabase categoriesFor: #saveImage!public! !842!StImageDatabase categoriesFor: #updateTask:!public! !843!StImageDatabase class methodsFor!844saveImageWithoutMonitor845 "SmalltalkImage current saveSession"846 !847users848 ^Users ifNil: [Users := OrderedCollection new]!849Users850 ^Users!851Users: anUsers852 Users := anUsers!853writeMutex854"^ WriteMutex ifNil: [WriteMutex := Monitor new]"! !855!StImageDatabase class categoriesFor: #saveImageWithoutMonitor!public! !856!StImageDatabase class categoriesFor: #users!public! !857!StImageDatabase class categoriesFor: #Users!public! !858!StImageDatabase class categoriesFor: #Users:!public! !859!StImageDatabase class categoriesFor: #writeMutex!public! !...
viewer-test-pptr.js
Source:viewer-test-pptr.js
1/**2 * @license Copyright 2018 The Lighthouse Authors. All Rights Reserved.3 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.04 * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.5 */6'use strict';7/* eslint-env jest */8import fs from 'fs';9import assert from 'assert';10import {jest} from '@jest/globals';11import puppeteer from 'puppeteer';12import {server} from '../../lighthouse-cli/test/fixtures/static-server.js';13import defaultConfig from '../../lighthouse-core/config/default-config.js';14import {LH_ROOT} from '../../root.js';15import {getCanonicalLocales} from '../../shared/localization/format.js';16const portNumber = 10200;17const viewerUrl = `http://localhost:${portNumber}/dist/gh-pages/viewer/index.html`;18const sampleLhr = LH_ROOT + '/lighthouse-core/test/results/sample_v2.json';19const lighthouseCategories = Object.keys(defaultConfig.categories);20const getAuditsOfCategory = category => defaultConfig.categories[category].auditRefs;21// These tests run in Chromium and have their own timeouts.22// Make sure we get the more helpful test-specific timeout error instead of jest's generic one.23jest.setTimeout(35_000);24// TODO: should be combined in some way with clients/test/extension/extension-test.js25describe('Lighthouse Viewer', () => {26 // eslint-disable-next-line no-console27 console.log('\n⨠Be sure to have recently run this: yarn build-viewer');28 /** @type {import('puppeteer').Browser} */29 let browser;30 /** @type {import('puppeteer').Page} */31 let viewerPage;32 const pageErrors = [];33 const selectors = {34 audits: '.lh-audit, .lh-metric',35 titles: '.lh-audit__title, .lh-metric__title',36 };37 function getAuditElementsIds({category, selector}) {38 return viewerPage.evaluate(39 ({category, selector}) => {40 const elems = document.querySelector(`#${category}`).parentNode.querySelectorAll(selector);41 return Array.from(elems).map(el => el.id);42 }, {category, selector}43 );44 }45 function getCategoryElementsIds() {46 return viewerPage.evaluate(47 () => {48 return Array.from(document.querySelectorAll(`.lh-category`)).map(el => el.id);49 });50 }51 beforeAll(async () => {52 await server.listen(portNumber, 'localhost');53 // start puppeteer54 browser = await puppeteer.launch({55 headless: true,56 });57 viewerPage = await browser.newPage();58 viewerPage.on('pageerror', pageError => pageErrors.push(pageError));59 });60 afterAll(async function() {61 // Log any page load errors encountered in case before() failed.62 // eslint-disable-next-line no-console63 if (pageErrors.length > 0) console.error(pageErrors);64 await Promise.all([65 server.close(),66 browser && browser.close(),67 ]);68 });69 describe('Renders the report', () => {70 beforeAll(async function() {71 await viewerPage.goto(viewerUrl, {waitUntil: 'networkidle2', timeout: 30000});72 const fileInput = await viewerPage.$('#hidden-file-input');73 await fileInput.uploadFile(sampleLhr);74 await viewerPage.waitForSelector('.lh-container', {timeout: 30000});75 });76 it('should load with no errors', async () => {77 assert.deepStrictEqual(pageErrors, []);78 });79 it('should contain all categories', async () => {80 const categories = await getCategoryElementsIds();81 assert.deepStrictEqual(82 categories.sort(),83 lighthouseCategories.sort(),84 `all categories not found`85 );86 });87 it('should contain audits of all categories', async () => {88 for (const category of lighthouseCategories) {89 let expected = getAuditsOfCategory(category);90 if (category === 'performance') {91 expected = getAuditsOfCategory(category).filter(a => !!a.group);92 }93 expected = expected.map(audit => audit.id);94 const elementIds = await getAuditElementsIds({category, selector: selectors.audits});95 assert.deepStrictEqual(96 elementIds.sort(),97 expected.sort(),98 `${category} does not have the identical audits`99 );100 }101 });102 it('should contain a filmstrip', async () => {103 const filmstrip = await viewerPage.$('.lh-filmstrip');104 assert.ok(!!filmstrip, `filmstrip is not available`);105 });106 it('should not have any unexpected audit errors', async () => {107 function getErrors(elems, selectors) {108 return elems.map(el => {109 const audit = el.closest(selectors.audits);110 const auditTitle = audit && audit.querySelector(selectors.titles);111 return {112 explanation: el.textContent,113 title: auditTitle ? auditTitle.textContent : 'Audit title unvailable',114 };115 });116 }117 const errorSelectors = '.lh-audit-explanation, .lh-tooltip--error';118 const auditErrors = await viewerPage.$$eval(errorSelectors, getErrors, selectors);119 const errors = auditErrors.filter(item => item.explanation.includes('Audit error:'));120 assert.deepStrictEqual(errors, [], 'Audit errors found within the report');121 });122 it('should support swapping locales', async () => {123 function queryLocaleState() {124 return viewerPage.$$eval('.lh-locale-selector', (elems) => {125 const selectEl = elems[0];126 const optionEls = [...selectEl.querySelectorAll('option')];127 return {128 selectedValue: selectEl.value,129 options: optionEls.map(el => {130 return el.value;131 }),132 sampleString: document.querySelector('.lh-report-icon--copy').textContent,133 };134 });135 }136 const resultBeforeSwap = await queryLocaleState();137 expect(resultBeforeSwap.selectedValue).toBe('en-US');138 expect(resultBeforeSwap.options).toEqual(getCanonicalLocales());139 expect(resultBeforeSwap.sampleString).toBe('Copy JSON');140 await viewerPage.select('.lh-locale-selector', 'es');141 await viewerPage.waitForFunction(() => {142 return document.querySelector('.lh-report-icon--copy').textContent === 'Copiar JSON';143 });144 const resultAfterSwap = await queryLocaleState();145 expect(resultAfterSwap.selectedValue).toBe('es');146 expect(resultAfterSwap.sampleString).toBe('Copiar JSON');147 });148 });149 describe('PSI', () => {150 /** @type {Partial<puppeteer.ResponseForRequest>} */151 let interceptedRequest;152 /** @type {Partial<puppeteer.ResponseForRequest>} */153 let psiResponse;154 const sampleLhrJson = JSON.parse(fs.readFileSync(sampleLhr, 'utf-8'));155 /** @type {Partial<puppeteer.ResponseForRequest>} */156 const goodPsiResponse = {157 status: 200,158 contentType: 'application/json',159 body: JSON.stringify({lighthouseResult: sampleLhrJson}),160 headers: {161 'Access-Control-Allow-Origin': '*',162 },163 };164 /** @type {Partial<puppeteer.ResponseForRequest>} */165 const badPsiResponse = {166 status: 500,167 contentType: 'application/json',168 body: JSON.stringify({error: {message: 'Test error'}}),169 headers: {170 'Access-Control-Allow-Origin': '*',171 },172 };173 /**174 * Sniffs just the request made to the PSI API. All other requests175 * fall through.176 * To set the mocked PSI response, assign `psiResponse`.177 * To read the intercepted request, use `interceptedRequest`.178 * @param {import('puppeteer').HTTPRequest} request179 */180 function onRequest(request) {181 if (request.url().includes('https://www.googleapis.com')) {182 interceptedRequest = request;183 request.respond(psiResponse);184 } else {185 request.continue();186 }187 }188 beforeAll(async () => {189 await viewerPage.setRequestInterception(true);190 viewerPage.on('request', onRequest);191 });192 afterAll(async () => {193 viewerPage.off('request', onRequest);194 await viewerPage.setRequestInterception(false);195 });196 beforeEach(() => {197 interceptedRequest = undefined;198 psiResponse = undefined;199 });200 it('should call out to PSI with all categories by default', async () => {201 psiResponse = goodPsiResponse;202 const url = `${viewerUrl}?psiurl=https://www.example.com`;203 await viewerPage.goto(url);204 // Wait for report to render.205 await viewerPage.waitForSelector('.lh-metrics-container', {timeout: 5000});206 const interceptedUrl = new URL(interceptedRequest.url());207 expect(interceptedUrl.origin + interceptedUrl.pathname)208 .toEqual('https://www.googleapis.com/pagespeedonline/v5/runPagespeed');209 const params = {210 key: interceptedUrl.searchParams.get('key'),211 url: interceptedUrl.searchParams.get('url'),212 category: interceptedUrl.searchParams.getAll('category'),213 strategy: interceptedUrl.searchParams.get('strategy'),214 locale: interceptedUrl.searchParams.get('locale'),215 utm_source: interceptedUrl.searchParams.get('utm_source'),216 };217 expect(params).toEqual({218 key: 'AIzaSyAjcDRNN9CX9dCazhqI4lGR7yyQbkd_oYE',219 url: 'https://www.example.com',220 // Order in the api call is important to PSI!221 category: [222 'performance',223 'accessibility',224 'seo',225 'best-practices',226 'pwa',227 ],228 strategy: 'mobile',229 // These values aren't set by default.230 locale: null,231 utm_source: null,232 });233 // Confirm that all default categories are used.234 const defaultCategories = Object.keys(defaultConfig.categories).sort();235 expect(interceptedUrl.searchParams.getAll('category').sort()).toEqual(defaultCategories);236 // No errors.237 assert.deepStrictEqual(pageErrors, []);238 // All categories.239 const categoryElementIds = await getCategoryElementsIds();240 assert.deepStrictEqual(241 categoryElementIds.sort(),242 lighthouseCategories.sort(),243 `all categories not found`244 );245 // Should not clear the query string.246 expect(await viewerPage.url()).toEqual(url);247 });248 it('should call out to PSI with specified categories', async () => {249 psiResponse = goodPsiResponse;250 const url = `${viewerUrl}?psiurl=https://www.example.com&category=seo&category=pwa&utm_source=utm&locale=es`;251 await viewerPage.goto(url);252 // Wait for report to render.call out to PSI with specified categories253 await viewerPage.waitForSelector('.lh-metrics-container');254 const interceptedUrl = new URL(interceptedRequest.url());255 expect(interceptedUrl.origin + interceptedUrl.pathname)256 .toEqual('https://www.googleapis.com/pagespeedonline/v5/runPagespeed');257 const params = {258 url: interceptedUrl.searchParams.get('url'),259 category: interceptedUrl.searchParams.getAll('category'),260 locale: interceptedUrl.searchParams.get('locale'),261 utm_source: interceptedUrl.searchParams.get('utm_source'),262 };263 expect(params).toEqual({264 url: 'https://www.example.com',265 category: [266 'seo',267 'pwa',268 ],269 locale: 'es',270 utm_source: 'utm',271 });272 // No errors.273 assert.deepStrictEqual(pageErrors, []);274 });275 it('should handle errors from the API', async () => {276 psiResponse = badPsiResponse;277 const url = `${viewerUrl}?psiurl=https://www.example.com`;278 await viewerPage.goto(url);279 // Wait for error.280 const errorEl = await viewerPage.waitForSelector('#lh-log.lh-show');281 const errorMessage = await viewerPage.evaluate(errorEl => errorEl.textContent, errorEl);282 expect(errorMessage).toBe('Test error');283 // One error.284 expect(pageErrors).toHaveLength(1);285 expect(pageErrors[0].message).toContain('Test error');286 });287 });...
controllers.js
Source:controllers.js
1 hollaApp.controller('usersController', function(UserFactory, socket, ChatroomFactory) {2 console.log("controller kicks in here")3 this.friendsList;4 var _this = this;5 ///////temporary place holder value for testing6 this.newUser = {7 name: "sung",8 phoneNumber: 31074536379 };10 ////11 this.chatRoomStatus = false;12 var self = this13 socket.on('connect', function(data){14 console.log("connected", socket.id)15 })16 socket.on('updateFriendList', function(data){17 console.log("a friend logged in updating friend list now", _this.user.friends);18 _this.showFriends(_this.user.phoneNumber, function(){19 console.log("friend list updated to ", _this.friendsList)20 })21 // _this.friendsList = _this.user.friends;22 })23 this.login = function() {24 this.user = this.newUser25 console.log("add user", this.user)26 UserFactory.logIn(this.user27 , function(res) {28 console.log("fdsfadfdsfsdfdsf",res)29 _this.user = res;30 console.log("this dot user updated", _this.user)31 user = res;32 _this.showFriends(_this.user.phoneNumber, function(){33 console.log("emitting to socket to update socktID")34 socket.emit("updateSocketID", _this.user);35 });36 });37 };38 this.showFriends = function(user, callback){39 console.log("fetching friends for ", user);40 UserFactory.showFriends(user, function(res){41 console.log(res);42 _this.user = res43 _this.friendsList = res.friends44 // do something when got the firend list45 // if you use "this" here, it refers to factory, you need to refer controller46 console.log(_this.friendsList)47 callback();48 })49 };50 this.startChat = function(friend){51 console.log(friend);52 ChatroomFactory.startChatroom(friend, function(res){53 console.log('starting the chat with', friend)54 if (friend.cSocketID){55 ChatroomFactory.sendTo = friend.cSocketID56 }57 })58 socket.emit("startedChat", friend)59 }60 this.addFriend = function(){61 console.log("new friend adding from controller triggered", this.newFriend)62 var friendAdding = this.user;63 friendAdding.friendPhoneNumber = this.newFriend.phoneNumber64 UserFactory.newFriend(friendAdding, function(){65 // do something when added friend like 66 // refreshing the friend list.67 console.log(this.user, "showfing friends with uer")68 _this.showFriends(this.user.phoneNumber);69 })70 this.newFriend = {};71 };72 // this.getFriendListByUserName = function(userName){73 // }74 })75hollaApp.controller('chatroomController', function(ChatroomFactory, socket){76 //controller for chat room77 var _this = this78 this.conversation = [''];79 socket.on('message', function(message){80 console.log("message", message);81 message.from = "friend";82 _this.conversation.push(message)83 console.log(_this.conversation);84 })85 this.test = "dsfdf";86 this.sendMessage = function(){87 console.log(this.message);88 ChatroomFactory.sendMessage(this.message, function(res){89 });90 this.message.sendTo = ChatroomFactory.sendTo91 var messageData = {92 message: this.message,93 sendTo: ChatroomFactory.sendTo,94 sentFrom: user.cSocketID95 }96 socket.emit("sendMessageToServer", messageData)97 messageData.from = "self";98 _this.conversation.push(messageData);99 this.message = "";100 }101})102hollaApp.controller('strokeCentersController', function(socket){103 socket.on('thereWasRequest', function(data){104 console.log("there was request");105 console.log(data);106 _this.embSocket = data.socketID;107 }108 );109 socket.on('hospitalResponse', function(data){110 console.log("there was hospital response");111 console.log(data);112 }113 );114 var _this = this;115 this.sendRequest = function(){116 console.log("sending request", _this.request);117 var request = { string: _this.request};118 socket.emit("requestSent", request);119 _this.request = "";120 }121 this.responseRequest = function(){122 console.log("sending response for request", _this.response);123 var response = {124 string : _this.response,125 socketID : _this.embSocket126 }127 socket.emit('responseForRequest', response);128 _this.response = "";129 }...
server.js
Source:server.js
1var express = require('express');2var path = require('path');3var app = express();4var bodyParser = require('body-parser');5app.use(bodyParser.urlencoded());6app.use(bodyParser.json());7app.set('port', (process.env.PORT || 7000));8// app.use(express.static(__dirname));9app.use(express.static(path.join(__dirname,'client')));10var server = app.listen(app.get('port'), function() {11 console.log("stoke at port: 7000")12});13var hospital = { 14 strokeCenter: [{15 key: "UW",16 name: "UW Medicine/Northwest",17 available: false},18 {19 key: "VMMC",20 name: "Virginia Mason Medical Center",21 available: false22 }, {23 key: "SMC",24 name: "Swedish Medical Center",25 available: false26 }, {27 key: "SMCCH",28 name: "Swedish Medical Center/Cherry Hill",29 available: false30 }, {31 key: "HMC",32 name: "Harborview Medical Center",33 available: false34 }35 ]36}37var updateAva = function(){38 var avaArr = [];39 for (center in hospital.strokeCenter) {40 avaArr.push(hospital.strokeCenter[center].available)41 }42 return avaArr43};44var io = require('socket.io').listen(server);45io.sockets.on('connection', function(socket){46 console.log("socket connected ", socket.id);47 socket.on("embulanceLogged", function(data){48 console.log("embulance logged in")49 var updateInfo = updateAva();50 console.log(updateInfo);51 socket.emit("updateHospitalAv", updateInfo);52 })53 socket.on("requestSent", function(data){54 data.socketID = socket.id;55 console.log("request sent", data);56 socket.broadcast.emit('thereWasRequest', data);57 });58 socket.on("responseForRequest", function(data){59 console.log("response for request ", data)60 var embSocket = data[1];61 console.log(embSocket)62 if (io.sockets.connected[embSocket]){63 console.log("emitting")64 io.sockets.connected[embSocket].emit('hospitalResponse', data[0])65 }66 });67 socket.on('disconnect', function(){68 console.log("socket disconnected",socket.id);69 });70 socket.on("availability", function(data){71 console.log("availability socket triggerred", data)72 for (center in hospital.strokeCenter) {73 console.log(hospital.strokeCenter[center].key);74 if (hospital.strokeCenter[center].key == data[0]){75 console.log("changing the availability of", hospital.strokeCenter[center].key);76 hospital.strokeCenter[center].available = data[1];77 var updateInfo = updateAva();78 socket.broadcast.emit("updateHospitalAv", updateInfo);79 }80 }81 console.log(hospital);82 });83 socket.on("notifyHospital", function(hospitalKey){84 console.log(hospitalKey);85 var data = [hospitalKey, String(socket.id)];86 socket.broadcast.emit("notifySentToHospital", data);87 })88// console.log("socket connected", socket.id);89// socket.on("startedChat", function(data){90// console.log(data)91// users.find(data, socket);92// // var xxx = "chris"93// // console.log(receiver);94// // io.sockets.emit('receiver',xxx);95// });96// socket.on('updateSocketID', function(data){97// data.cSocketID = socket.id;98// console.log(data, "data");99// users.updateSocketID(data, function(){100// for (var friend = 0; friend < data.friends.length; friend++){101// if (data.friends[friend].cSocketID){102// var friendSocketID = data.friends[friend].cSocketID;103// console.log("emitting to friend", friendSocketID)104// if (io.sockets.connected[friendSocketID]){105// console.log("emitting")106// io.sockets.connected[friendSocketID].emit('updateFriendList', data)107// }108// }109// console.log(1, data.friends[friend].cSocketID, friend, data.friends.length)110// }111// });112// });113// socket.on('disconnect', function(){114// users.disconnectSocket(socket.id);115// });116// socket.on('sendMessageToServer', function(data){117// console.log("sendmessage",data,"from socket id ",socket.id)118// if(data.sendTo){119// if (io.sockets.connected[data.sendTo]){120// console.log("really emitting the message to ", data.sendTo)121// io.sockets.connected[data.sendTo].emit('message', data);122// }123// }124// })...
pretender.js
Source:pretender.js
...27 request: expectedRequest,28 response: response29 });30 this.pretender.post(url, function(request){31 var responseForRequest = _this.responseForRequest('post', request);32 var string = JSON.stringify(responseForRequest);33 return [201, {"Content-Type": "application/json"}, string]34 });35 },36 patch: function(url, expectedRequest, response) {37 var _this = this;38 this.validatePayload(expectedRequest, 'PATCH', url);39 this.validatePayload(response, 'PATCH', url);40 this.availableRequests.patch.push({41 request: expectedRequest,42 response: response43 });44 this.pretender.patch(url, function(request){45 var responseForRequest = _this.responseForRequest('patch', request);46 var string = JSON.stringify(responseForRequest);47 return [200, {"Content-Type": "application/json"}, string]48 });49 },50 /**51 * We have a set of expected requests. Each one returns a particular52 * response. Here, we check that what's being requests exists in53 * `this.availableRequests` and then return it.54 *55 * If it doesn't exist, we throw errors (and rocks).56 */57 responseForRequest: function(verb, currentRequest) {58 var sortString = function(s) {59 var c = [];...
ApiUtils.js
Source:ApiUtils.js
1var ServerActionCreators = require('../actions/ServerActionCreators.js');2var AppConstants = require('../constants/AppConstants.js');3var ApiKeyTypes = AppConstants.ApiKeyTypes;4var HOST = 'localhost';5var PROTOCOL = 'http:';6var configureApi = function() {7 PROTOCOL = window.location.protocol;8 HOST = window.location.hostname + (window.location.port ? ':' + window.location.port: '');9};10var make_api_url = function(part) {11 return PROTOCOL + '//' + HOST + '/listapp/' + part;12};13var getRequest = function(key, req_url, callback) {14 /*15 * @param {String} key - ApiKeyTypes value16 * @param {String} req_url - full URL17 * @param {function} callback for the xhr18 */19 console.debug('GET: ' + req_url);20 var xhr = new XMLHttpRequest();21 xhr.open('GET', req_url);22 xhr.onreadystatechange = function() {23 var data;24 if (xhr.readyState == 4) {25 console.debug('Status code: ' + xhr.status);26 if (xhr.status == 200) {27 data = JSON.parse(xhr.responseText);28 callback(null, key, data);29 } else {30 data = {31 http_status_code: xhr.status,32 error_message: ''33 };34 if (xhr.responseText.length) {35 try {36 var ed = JSON.parse(xhr.responseText);37 data['error_message'] = ed['error_message'];38 } catch (e) {39 data['error_message'] = '';40 }41 }42 callback(data, key, null);43 }44 }45 }46 xhr.send();47};48module.exports = {49 configureApi: configureApi,50 searchLists: function(topic, title) {51 var req_url = make_api_url('list/search/');52 if (topic.length && title.length) {53 req_url = req_url + '?topic=' + topic;54 req_url = req_url + '&title=' + title;55 } else if (topic.length) {56 req_url = req_url + '?topic=' + topic;57 } else if (title.length) {58 req_url = req_url + '?title=' + title;59 }60 getRequest(ApiKeyTypes.FETCH_LISTS,61 req_url,62 ServerActionCreators.responseForRequest63 );64 }...
ServerActionCreators.js
Source:ServerActionCreators.js
1var AppDispatcher = require('../dispatchers/AppDispatcher.js');2var AppConstants = require('../constants/AppConstants.js');3var ApiKeyTypes = AppConstants.ApiKeyTypes;4var ServerActionTypes = AppConstants.ServerActionTypes;5module.exports = {6 responseForRequest: function(err, apikey, serverData) {7 var payload = {};8 var action_type = null;9 var err_action_type = null;10 switch(apikey) {11 case ApiKeyTypes.FETCH_LISTS:12 action_type = ServerActionTypes.FETCH_LISTS_SUCCESS;13 err_action_type = ServerActionTypes.FETCH_LISTS_ERROR;14 break;15 default:16 break;17 }18 if (err) {19 payload.actionType = err_action_type;20 payload.err = err; // object w. keys: http_status_code21 } else {22 payload.actionType = action_type;23 payload.serverData = serverData;24 }25 console.debug(payload);26 if (action_type)27 AppDispatcher.dispatch(payload);28 }...
Using AI Code Generation
1const { PuppeteerCrawler } = require('apify');2const crawler = new PuppeteerCrawler({3 requestQueue: new RequestQueue(),4 handlePageFunction: async ({ request, response, page }) => {5 const response = await crawler.responseForRequest(request);6 console.log(response);7 },8});9const request = new Request({10 userData: {11 },12});13await crawler.requestQueue.addRequest(request);14await crawler.run();15const { CheerioCrawler } = require('apify');16const crawler = new CheerioCrawler({17 requestQueue: new RequestQueue(),18 handlePageFunction: async ({ request, response }) => {19 const response = await crawler.responseForRequest(request);20 console.log(response);21 },22});23const request = new Request({24 userData: {25 },26});27await crawler.requestQueue.addRequest(request);28await crawler.run();
Using AI Code Generation
1const { PuppeteerCrawler } = require('apify');2const crawler = new PuppeteerCrawler({3 handlePageFunction: async ({ request, response, page }) => {4 const responseContent = await responseForRequest(request);5 await Apify.setValue('OUTPUT', responseContent);6 },7});8await crawler.run();9const { CheerioCrawler } = require('apify');10const crawler = new CheerioCrawler({11 handlePageFunction: async ({ request, response, $ }) => {12 const responseContent = await responseForRequest(request);13 await Apify.setValue('OUTPUT', responseContent);14 },15});16await crawler.run();17const { BasicCrawler } = require('apify');18const crawler = new BasicCrawler({19 handleRequestFunction: async ({ request, response }) => {20 const responseContent = await responseForRequest(request);21 await Apify.setValue('OUTPUT', responseContent);22 },23});24await crawler.run();25const { AutoscaledPool } = require('apify');26const pool = new AutoscaledPool({27 runTaskFunction: async ({ request, response }) => {28 const responseContent = await responseForRequest(request);29 await Apify.setValue('OUTPUT', responseContent);30 },31});32await pool.run();33const { PuppeteerPool } = require('apify');34const pool = new PuppeteerPool({35 runTaskFunction: async ({ request, response, page }) => {36 const responseContent = await responseForRequest(request);37 await Apify.setValue('OUTPUT', responseContent);38 },39});40await pool.run();41const { CheerioCrawler } = require('apify');
Using AI Code Generation
1const puppeteer = require('puppeteer');2const { PuppeteerRequestInterceptor } = require('puppeteer-request-spy');3const browser = await puppeteer.launch({ headless: false });4const page = await browser.newPage();5const puppeteerRequestInterceptor = new PuppeteerRequestInterceptor(page);6puppeteerRequestInterceptor.enable();7const interceptedRequest = await puppeteerRequestInterceptor.responseForRequest({8});9console.log(interceptedRequest.response().headers());10await puppeteerRequestInterceptor.disable();11await browser.close();12const puppeteer = require('puppeteer');13const { PuppeteerRequestInterceptor } = require('puppeteer-request-spy');14const browser = await puppeteer.launch({ headless: false });15const page = await browser.newPage();16const puppeteerRequestInterceptor = new PuppeteerRequestInterceptor(page);17puppeteerRequestInterceptor.enable();18const interceptedRequest = await puppeteerRequestInterceptor.responseForRequest({19});20console.log(interceptedRequest.response().headers());21await puppeteerRequestInterceptor.disable();22await browser.close();23const puppeteer = require('puppeteer');24const { PuppeteerRequestInterceptor } = require('puppeteer-request-spy');25const browser = await puppeteer.launch({ headless: false });26const page = await browser.newPage();27const puppeteerRequestInterceptor = new PuppeteerRequestInterceptor(page);28puppeteerRequestInterceptor.enable();29const interceptedRequest = await puppeteerRequestInterceptor.responseForRequest({30});31console.log(interceptedRequest.response().headers());32await puppeteerRequestInterceptor.disable();33await browser.close();34const puppeteer = require('puppeteer');35const { PuppeteerRequestInterceptor } = require('puppeteer-request-spy');36const browser = await puppeteer.launch({ headless: false });37const page = await browser.newPage();38const puppeteerRequestInterceptor = new PuppeteerRequestInterceptor(page);39puppeteerRequestInterceptor.enable();40const interceptedRequest = await puppeteerRequestInterceptor.responseForRequest({
Using AI Code Generation
1const { PuppeteerCrawler } = require('apify');2const crawler = new PuppeteerCrawler({3 handlePageFunction: ({ request, response }) => {4 response.text().then(text => console.log(text));5 },6 handleFailedRequestFunction: ({ request }) => {7 console.log(`Request ${request.url} failed too many times`);8 },9});10await crawler.run();11const { CheerioCrawler } = require('apify');12const crawler = new CheerioCrawler({13 handlePageFunction: ({ request, response }) => {14 response.text().then(text => console.log(text));15 },16 handleFailedRequestFunction: ({ request }) => {17 console.log(`Request ${request.url} failed too many times`);18 },19});20await crawler.run();
Using AI Code Generation
1const puppeteerCrawler = require('apify-js').PuppeteerCrawler;2const request = require('request-promise-native');3const cheerio = require('cheerio');4const handlePageFunction = async ({ request, page }) => {5 const title = await page.title();6 console.log(`Title of ${request.url}: ${title}`);7 const html = await page.content();8 const $ = cheerio.load(html);9 const rating = $('span[itemprop="ratingValue"]').text();10 console.log(`Rating of ${request.url}: ${rating}`);11 const year = $('span[class="lister-item-year text-muted unbold"]').text();12 console.log(`Release year of ${request.url}: ${year}`);13 const name = $('h3[class="lister-item-header"]').text();14 console.log(`Name of ${request.url}: ${name}`);15};16const requestList = new RequestList({17 { requestsFromUrl: url },18});19const crawler = new PuppeteerCrawler({20});21await crawler.run();22| `requestList` | [`RequestList`](/docs/api/request-list) | A pre-initialized instance of `RequestList` class. | - |23| `requestQueue` | [`RequestQueue`](/docs/api/request-queue) | A pre-initialized instance of `RequestQueue` class. | - |
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!