Best JavaScript code snippet using taiko
Greetings.ts
Source:Greetings.ts
...71 // Set fill color to C65911 for range HappyXmasTree!N16:Q1772 selectedSheet.getRange("N16:Q17")73 .getFormat()74 .getFill()75 .setColor("C65911");76 // Set fill color to C65911 for range HappyXmasTree!G16:J1777 selectedSheet.getRange("G16:J17")78 .getFormat()79 .getFill()80 .setColor("C65911");81 }82 function Unblink(workbook: ExcelScript.Workbook) {83 let selectedSheet = workbook.getWorksheet('HappyXmasTree');84 // Set fill color to FFFFFF for range HappyXmasTree!N16:N1785 selectedSheet.getRange("N16:N17")86 .getFormat()87 .getFill()88 .setColor("FFFFFF");89 // Set fill color to FFFFFF for range HappyXmasTree!O16:Q1690 selectedSheet.getRange("O16:Q16")91 .getFormat()92 .getFill()93 .setColor("FFFFFF");94 // Set fill color to FFFFFF for range HappyXmasTree!G16:H1795 selectedSheet.getRange("G16:H17")96 .getFormat()97 .getFill()98 .setColor("FFFFFF");99 // Set fill color to FFFFFF for range HappyXmasTree!I16:J16100 selectedSheet.getRange("I16:J16")101 .getFormat()102 .getFill()103 .setColor("FFFFFF");104 // Set fill color to FFFFFF for range HappyXmasTree!P17:Q17105 selectedSheet.getRange("P17:Q17")106 .getFormat()107 .getFill()108 .setColor("FFFFFF");109 // Set fill color to FFFFFF for range HappyXmasTree!J17110 selectedSheet.getRange("J17")111 .getFormat()112 .getFill()113 .setColor("FFFFFF");114 }115 function FlashingStarandSmileFF0000(workbook: ExcelScript.Workbook) {116 //red117 let selectedSheet = workbook.getWorksheet('HappyXmasTree');118 // Set fill color to FF0000 for range HappyXmasTree!L2:L6119 selectedSheet.getRange("L2:L6")120 .getFormat()121 .getFill()122 .setColor("FF0000");123 // Set fill color to FF0000 for range HappyXmasTree!K3:K5124 selectedSheet.getRange("K3:K5")125 .getFormat()126 .getFill()127 .setColor("FF0000");128 // Set fill color to FF0000 for range HappyXmasTree!M3:M5129 selectedSheet.getRange("M3:M5")130 .getFormat()131 .getFill()132 .setColor("FF0000");133 // Set fill color to FF0000 for range HappyXmasTree!N4134 selectedSheet.getRange("N4")135 .getFormat()136 .getFill()137 .setColor("FF0000");138 // Set fill color to FF0000 for range HappyXmasTree!J4139 selectedSheet.getRange("J4")140 .getFormat()141 .getFill()142 .setColor("FF0000");143 // Set fill color to 000000 for range HappyXmasTree!O26144 selectedSheet.getRange("O26")145 .getFormat()146 .getFill()147 .setColor("000000");148 // Set fill color to 000000 for range HappyXmasTree!I26149 selectedSheet.getRange("I26")150 .getFormat()151 .getFill()152 .setColor("000000") //black153 }154 function FlashingStarandSmileFFFF00(workbook: ExcelScript.Workbook) {155 //yellow156 let selectedSheet = workbook.getWorksheet('HappyXmasTree');157 // Set fill color to FF0000 for range HappyXmasTree!L2:L6158 selectedSheet.getRange("L2:L6")159 .getFormat()160 .getFill()161 .setColor("FFFF00");162 // Set fill color to FF0000 for range HappyXmasTree!K3:K5163 selectedSheet.getRange("K3:K5")164 .getFormat()165 .getFill()166 .setColor("FFFF00");167 // Set fill color to FF0000 for range HappyXmasTree!M3:M5168 selectedSheet.getRange("M3:M5")169 .getFormat()170 .getFill()171 .setColor("FFFF00");172 // Set fill color to FF0000 for range HappyXmasTree!N4173 selectedSheet.getRange("N4")174 .getFormat()175 .getFill()176 .setColor("FFFF00");177 // Set fill color to FF0000 for range HappyXmasTree!J4178 selectedSheet.getRange("J4")179 .getFormat()180 .getFill()181 .setColor("FFFF00");182 // Set fill color to 000000 for range HappyXmasTree!O26183 selectedSheet.getRange("O26")184 .getFormat()185 .getFill().clear186 //.setColor("000000");187 // Set fill color to 000000 for range HappyXmasTree!I26188 selectedSheet.getRange("I26")189 .getFormat()190 .getFill().clear191 //.setColor("000000")192 }193 //OuterEdgeClearFill()194 console.log('Routine finished')195 }196function OuterEdgeFFFF00(workbook: ExcelScript.Workbook) {197 // Set fill color to FFFF00 for range sheet!Q11198 let sheet = workbook.getWorksheet('HappyXmasTree')199 sheet.getRange("Q11")200 .getFormat()201 .getFill()202 .setColor("FFFF00");203 // Set fill color to FFFF00 for range sheet!G11204 sheet.getRange("G11")205 .getFormat()206 .getFill()207 .setColor("FFFF00");208 // Set fill color to FFFF00 for range sheet!R12209 sheet.getRange("R12")210 .getFormat()211 .getFill()212 .setColor("FFFF00");213 // Set fill color to FFFF00 for range sheet!F12214 sheet.getRange("F12")215 .getFormat()216 .getFill()217 .setColor("FFFF00");218 // Set fill color to FFFF00 for range sheet!S13219 sheet.getRange("S13")220 .getFormat()221 .getFill()222 .setColor("FFFF00");223 // Set fill color to FFFF00 for range sheet!E13224 sheet.getRange("E13")225 .getFormat()226 .getFill()227 .setColor("FFFF00");228 // Set fill color to FFFF00 for range sheet!T14229 sheet.getRange("T14")230 .getFormat()231 .getFill()232 .setColor("FFFF00");233 // Set fill color to FFFF00 for range sheet!D14234 sheet.getRange("D14")235 .getFormat()236 .getFill()237 .setColor("FFFF00");238 // Set fill color to FFFF00 for range sheet!C15239 sheet.getRange("C15")240 .getFormat()241 .getFill()242 .setColor("FFFF00");243 // Set fill color to FFFF00 for range sheet!U15244 sheet.getRange("U15")245 .getFormat()246 .getFill()247 .setColor("FFFF00");248 // Set fill color to FFFF00 for range sheet!T16:T17249 sheet.getRange("T16:T17")250 .getFormat()251 .getFill()252 .setColor("FFFF00");253 // Set fill color to FFFF00 for range sheet!D16:D17254 sheet.getRange("D16:D17")255 .getFormat()256 .getFill()257 .setColor("FFFF00");258 // Set fill color to FFFF00 for range sheet!C18259 sheet.getRange("C18")260 .getFormat()261 .getFill()262 .setColor("FFFF00");263 // Set fill color to FFFF00 for range sheet!U18264 sheet.getRange("U18")265 .getFormat()266 .getFill()267 .setColor("FFFF00");268 // Set fill color to FFFF00 for range sheet!T19269 sheet.getRange("T19")270 .getFormat()271 .getFill()272 .setColor("FFFF00");273 // Set fill color to FFFF00 for range sheet!D19274 sheet.getRange("D19")275 .getFormat()276 .getFill()277 .setColor("FFFF00");278 // Set fill color to FFFF00 for range sheet!L2:L6279 sheet.getRange("L2:L6")280 .getFormat()281 .getFill()282 .setColor("FFFF00");283 // Set fill color to FFFF00 for range sheet!C21284 sheet.getRange("C21")285 .getFormat()286 .getFill()287 .setColor("FFFF00");288 // Set fill color to FFFF00 for range sheet!U21289 sheet.getRange("U21")290 .getFormat()291 .getFill()292 .setColor("FFFF00");293 // Set fill color to FFFF00 for range sheet!C23294 sheet.getRange("C23")295 .getFormat()296 .getFill()297 .setColor("FFFF00");298 // Set fill color to FFFF00 for range sheet!U23299 sheet.getRange("U23")300 .getFormat()301 .getFill()302 .setColor("FFFF00");303 // Set fill color to FFFF00 for range sheet!C25304 sheet.getRange("C25")305 .getFormat()306 .getFill()307 .setColor("FFFF00");308 // Set fill color to FFFF00 for range sheet!U25309 sheet.getRange("U25")310 .getFormat()311 .getFill()312 .setColor("FFFF00");313 // Set fill color to FFFF00 for range sheet!C27314 sheet.getRange("C27")315 .getFormat()316 .getFill()317 .setColor("FFFF00");318 // Set fill color to FFFF00 for range sheet!U27319 sheet.getRange("U27")320 .getFormat()321 .getFill()322 .setColor("FFFF00");323 // Set fill color to FFFF00 for range sheet!C29324 sheet.getRange("C29")325 .getFormat()326 .getFill()327 .setColor("FFFF00");328 // Set fill color to FFFF00 for range sheet!U29329 sheet.getRange("U29")330 .getFormat()331 .getFill()332 .setColor("FFFF00");333 // Set fill color to FFFF00 for range sheet!T30334 sheet.getRange("T30")335 .getFormat()336 .getFill()337 .setColor("FFFF00");338 // Set fill color to FFFF00 for range sheet!D30339 sheet.getRange("D30")340 .getFormat()341 .getFill()342 .setColor("FFFF00");343 // Set fill color to FFFF00 for range sheet!K3:K5344 sheet.getRange("K3:K5")345 .getFormat()346 .getFill()347 .setColor("FFFF00");348 // Set fill color to FFFF00 for range sheet!M3:M5349 sheet.getRange("M3:M5")350 .getFormat()351 .getFill()352 .setColor("FFFF00");353 // Set fill color to FFFF00 for range sheet!S31354 sheet.getRange("S31")355 .getFormat()356 .getFill()357 .setColor("FFFF00");358 // Set fill color to FFFF00 for range sheet!E31359 sheet.getRange("E31")360 .getFormat()361 .getFill()362 .setColor("FFFF00");363 // Set fill color to FFFF00 for range sheet!R32364 sheet.getRange("R32")365 .getFormat()366 .getFill()367 .setColor("FFFF00");368 // Set fill color to FFFF00 for range sheet!F32369 sheet.getRange("F32")370 .getFormat()371 .getFill()372 .setColor("FFFF00");373 // Set fill color to FFFF00 for range sheet!Q33374 sheet.getRange("Q33")375 .getFormat()376 .getFill()377 .setColor("FFFF00");378 // Set fill color to FFFF00 for range sheet!G33379 sheet.getRange("G33")380 .getFormat()381 .getFill()382 .setColor("FFFF00");383 // Set fill color to FFFF00 for range sheet!P34384 sheet.getRange("P34")385 .getFormat()386 .getFill()387 .setColor("FFFF00");388 // Set fill color to FFFF00 for range sheet!H34389 sheet.getRange("H34")390 .getFormat()391 .getFill()392 .setColor("FFFF00");393 // Set fill color to FFFF00 for range sheet!O35394 sheet.getRange("O35")395 .getFormat()396 .getFill()397 .setColor("FFFF00");398 // Set fill color to FFFF00 for range sheet!I35399 sheet.getRange("I35")400 .getFormat()401 .getFill()402 .setColor("FFFF00");403 // Set fill color to FFFF00 for range sheet!N36:N37404 sheet.getRange("N36:N37")405 .getFormat()406 .getFill()407 .setColor("FFFF00");408 // Set fill color to FFFF00 for range sheet!J36:J37409 sheet.getRange("J36:J37")410 .getFormat()411 .getFill()412 .setColor("FFFF00");413 // Set fill color to FFFF00 for range sheet!K37:M37414 sheet.getRange("K37:M37")415 .getFormat()416 .getFill()417 .setColor("FFFF00");418 // Set fill color to FFFF00 for range sheet!N4419 sheet.getRange("N4")420 .getFormat()421 .getFill()422 .setColor("FFFF00");423 // Set fill color to FFFF00 for range sheet!J4424 sheet.getRange("J4")425 .getFormat()426 .getFill()427 .setColor("FFFF00");428 // Set fill color to FFFF00 for range sheet!K7429 sheet.getRange("K7")430 .getFormat()431 .getFill()432 .setColor("FFFF00");433 // Set fill color to FFFF00 for range sheet!M7434 sheet.getRange("M7")435 .getFormat()436 .getFill()437 .setColor("FFFF00");438 // Set fill color to FFFF00 for range sheet!N8439 sheet.getRange("N8")440 .getFormat()441 .getFill()442 .setColor("FFFF00");443 // Set fill color to FFFF00 for range sheet!J8444 sheet.getRange("J8")445 .getFormat()446 .getFill()447 .setColor("FFFF00");448 // Set fill color to FFFF00 for range sheet!O9449 sheet.getRange("O9")450 .getFormat()451 .getFill()452 .setColor("FFFF00");453 // Set fill color to FFFF00 for range sheet!I9454 sheet.getRange("I9")455 .getFormat()456 .getFill()457 .setColor("FFFF00");458 // Set fill color to FFFF00 for range sheet!P10459 sheet.getRange("P10")460 .getFormat()461 .getFill()462 .setColor("FFFF00");463 // Set fill color to FFFF00 for range sheet!H10464 sheet.getRange("H10")465 .getFormat()466 .getFill()467 .setColor("FFFF00");468}469function OuterEdgeFF0000(workbook: ExcelScript.Workbook) {470 // Set fill color to FFFF00 for range sheet!Q11471 let sheet = workbook.getWorksheet('HappyXmasTree')472 sheet.getRange("Q11")473 .getFormat()474 .getFill()475 .setColor("FF0000");476 // Set fill color to FF0000 for range sheet!G11477 sheet.getRange("G11")478 .getFormat()479 .getFill()480 .setColor("FF0000");481 // Set fill color to FF0000 for range sheet!R12482 sheet.getRange("R12")483 .getFormat()484 .getFill()485 .setColor("FF0000");486 // Set fill color to FF0000 for range sheet!F12487 sheet.getRange("F12")488 .getFormat()489 .getFill()490 .setColor("FF0000");491 // Set fill color to FF0000 for range sheet!S13492 sheet.getRange("S13")493 .getFormat()494 .getFill()495 .setColor("FF0000");496 // Set fill color to FF0000 for range sheet!E13497 sheet.getRange("E13")498 .getFormat()499 .getFill()500 .setColor("FF0000");501 // Set fill color to FF0000 for range sheet!T14502 sheet.getRange("T14")503 .getFormat()504 .getFill()505 .setColor("FF0000");506 // Set fill color to FF0000 for range sheet!D14507 sheet.getRange("D14")508 .getFormat()509 .getFill()510 .setColor("FF0000");511 // Set fill color to FF0000 for range sheet!C15512 sheet.getRange("C15")513 .getFormat()514 .getFill()515 .setColor("FF0000");516 // Set fill color to FF0000 for range sheet!U15517 sheet.getRange("U15")518 .getFormat()519 .getFill()520 .setColor("FF0000");521 // Set fill color to FF0000 for range sheet!T16:T17522 sheet.getRange("T16:T17")523 .getFormat()524 .getFill()525 .setColor("FF0000");526 // Set fill color to FF0000 for range sheet!D16:D17527 sheet.getRange("D16:D17")528 .getFormat()529 .getFill()530 .setColor("FF0000");531 // Set fill color to FF0000 for range sheet!C18532 sheet.getRange("C18")533 .getFormat()534 .getFill()535 .setColor("FF0000");536 // Set fill color to FF0000 for range sheet!U18537 sheet.getRange("U18")538 .getFormat()539 .getFill()540 .setColor("FF0000");541 // Set fill color to FF0000 for range sheet!T19542 sheet.getRange("T19")543 .getFormat()544 .getFill()545 .setColor("FF0000");546 // Set fill color to FF0000 for range sheet!D19547 sheet.getRange("D19")548 .getFormat()549 .getFill()550 .setColor("FF0000");551 // Set fill color to FF0000 for range sheet!L2:L6552 sheet.getRange("L2:L6")553 .getFormat()554 .getFill()555 .setColor("FF0000");556 // Set fill color to FF0000 for range sheet!C21557 sheet.getRange("C21")558 .getFormat()559 .getFill()560 .setColor("FF0000");561 // Set fill color to FF0000 for range sheet!U21562 sheet.getRange("U21")563 .getFormat()564 .getFill()565 .setColor("FF0000");566 // Set fill color to FF0000 for range sheet!C23567 sheet.getRange("C23")568 .getFormat()569 .getFill()570 .setColor("FF0000");571 // Set fill color to FF0000 for range sheet!U23572 sheet.getRange("U23")573 .getFormat()574 .getFill()575 .setColor("FF0000");576 // Set fill color to FF0000 for range sheet!C25577 sheet.getRange("C25")578 .getFormat()579 .getFill()580 .setColor("FF0000");581 // Set fill color to FF0000 for range sheet!U25582 sheet.getRange("U25")583 .getFormat()584 .getFill()585 .setColor("FF0000");586 // Set fill color to FF0000 for range sheet!C27587 sheet.getRange("C27")588 .getFormat()589 .getFill()590 .setColor("FF0000");591 // Set fill color to FF0000 for range sheet!U27592 sheet.getRange("U27")593 .getFormat()594 .getFill()595 .setColor("FF0000");596 // Set fill color to FF0000 for range sheet!C29597 sheet.getRange("C29")598 .getFormat()599 .getFill()600 .setColor("FF0000");601 // Set fill color to FF0000 for range sheet!U29602 sheet.getRange("U29")603 .getFormat()604 .getFill()605 .setColor("FF0000");606 // Set fill color to FF0000 for range sheet!T30607 sheet.getRange("T30")608 .getFormat()609 .getFill()610 .setColor("FF0000");611 // Set fill color to FF0000 for range sheet!D30612 sheet.getRange("D30")613 .getFormat()614 .getFill()615 .setColor("FF0000");616 // Set fill color to FF0000 for range sheet!K3:K5617 sheet.getRange("K3:K5")618 .getFormat()619 .getFill()620 .setColor("FF0000");621 // Set fill color to FF0000 for range sheet!M3:M5622 sheet.getRange("M3:M5")623 .getFormat()624 .getFill()625 .setColor("FF0000");626 // Set fill color to FF0000 for range sheet!S31627 sheet.getRange("S31")628 .getFormat()629 .getFill()630 .setColor("FF0000");631 // Set fill color to FF0000 for range sheet!E31632 sheet.getRange("E31")633 .getFormat()634 .getFill()635 .setColor("FF0000");636 // Set fill color to FF0000 for range sheet!R32637 sheet.getRange("R32")638 .getFormat()639 .getFill()640 .setColor("FF0000");641 // Set fill color to FF0000 for range sheet!F32642 sheet.getRange("F32")643 .getFormat()644 .getFill()645 .setColor("FF0000");646 // Set fill color to FF0000 for range sheet!Q33647 sheet.getRange("Q33")648 .getFormat()649 .getFill()650 .setColor("FF0000");651 // Set fill color to FF0000 for range sheet!G33652 sheet.getRange("G33")653 .getFormat()654 .getFill()655 .setColor("FF0000");656 // Set fill color to FF0000 for range sheet!P34657 sheet.getRange("P34")658 .getFormat()659 .getFill()660 .setColor("FF0000");661 // Set fill color to FF0000 for range sheet!H34662 sheet.getRange("H34")663 .getFormat()664 .getFill()665 .setColor("FF0000");666 // Set fill color to FF0000 for range sheet!O35667 sheet.getRange("O35")668 .getFormat()669 .getFill()670 .setColor("FF0000");671 // Set fill color to FF0000 for range sheet!I35672 sheet.getRange("I35")673 .getFormat()674 .getFill()675 .setColor("FF0000");676 // Set fill color to FF0000 for range sheet!N36:N37677 sheet.getRange("N36:N37")678 .getFormat()679 .getFill()680 .setColor("FF0000");681 // Set fill color to FF0000 for range sheet!J36:J37682 sheet.getRange("J36:J37")683 .getFormat()684 .getFill()685 .setColor("FF0000");686 // Set fill color to FF0000 for range sheet!K37:M37687 sheet.getRange("K37:M37")688 .getFormat()689 .getFill()690 .setColor("FF0000");691 // Set fill color to FF0000 for range sheet!N4692 sheet.getRange("N4")693 .getFormat()694 .getFill()695 .setColor("FF0000");696 // Set fill color to FF0000 for range sheet!J4697 sheet.getRange("J4")698 .getFormat()699 .getFill()700 .setColor("FF0000");701 // Set fill color to FF0000 for range sheet!K7702 sheet.getRange("K7")703 .getFormat()704 .getFill()705 .setColor("FF0000");706 // Set fill color to FF0000 for range sheet!M7707 sheet.getRange("M7")708 .getFormat()709 .getFill()710 .setColor("FF0000");711 // Set fill color to FF0000 for range sheet!N8712 sheet.getRange("N8")713 .getFormat()714 .getFill()715 .setColor("FF0000");716 // Set fill color to FF0000 for range sheet!J8717 sheet.getRange("J8")718 .getFormat()719 .getFill()720 .setColor("FF0000");721 // Set fill color to FF0000 for range sheet!O9722 sheet.getRange("O9")723 .getFormat()724 .getFill()725 .setColor("FF0000");726 // Set fill color to FF0000 for range sheet!I9727 sheet.getRange("I9")728 .getFormat()729 .getFill()730 .setColor("FF0000");731 // Set fill color to FF0000 for range sheet!P10732 sheet.getRange("P10")733 .getFormat()734 .getFill()735 .setColor("FF0000");736 // Set fill color to FF0000 for range sheet!H10737 sheet.getRange("H10")738 .getFormat()739 .getFill()740 .setColor("FF0000");...
mapbox-streets-v6-style.js
Source:mapbox-streets-v6-style.js
...34 var disputed = feature.get('disputed');35 var maki = feature.get('maki');36 var geom = feature.getGeometry().getType();37 if (layer == 'landuse' && cls == 'park') {38 fill.setColor('#d8e8c8');39 styles[length++] = polygon;40 } else if (layer == 'landuse' && cls == 'cemetery') {41 fill.setColor('#e0e4dd');42 styles[length++] = polygon;43 } else if (layer == 'landuse' && cls == 'hospital') {44 fill.setColor('#fde');45 styles[length++] = polygon;46 } else if (layer == 'landuse' && cls == 'school') {47 fill.setColor('#f0e8f8');48 styles[length++] = polygon;49 } else if (layer == 'landuse' && cls == 'wood') {50 fill.setColor('rgb(233,238,223)');51 styles[length++] = polygon;52 } else if (layer == 'waterway' &&53 cls != 'river' && cls != 'stream' && cls != 'canal') {54 stroke.setColor('#a0c8f0');55 stroke.setWidth(1);56 styles[length++] = line;57 } else if (layer == 'waterway' && cls == 'river') {58 stroke.setColor('#a0c8f0');59 stroke.setWidth(1);60 styles[length++] = line;61 } else if (layer == 'waterway' && (cls == 'stream' ||62 cls == 'canal')) {63 stroke.setColor('#a0c8f0');64 stroke.setWidth(1);65 styles[length++] = line;66 } else if (layer == 'water') {67 fill.setColor('#a0c8f0');68 styles[length++] = polygon;69 } else if (layer == 'aeroway' && geom == 'Polygon') {70 fill.setColor('rgb(242,239,235)');71 styles[length++] = polygon;72 } else if (layer == 'aeroway' && geom == 'LineString' &&73 resolution <= 76.43702828517625) {74 stroke.setColor('#f0ede9');75 stroke.setWidth(1);76 styles[length++] = line;77 } else if (layer == 'building') {78 fill.setColor('#f2eae2');79 stroke.setColor('#dfdbd7');80 stroke.setWidth(1);81 styles[length++] = strokedPolygon;82 } else if (layer == 'tunnel' && cls == 'motorway_link') {83 stroke.setColor('#e9ac77');84 stroke.setWidth(1);85 styles[length++] = line;86 } else if (layer == 'tunnel' && cls == 'service') {87 stroke.setColor('#cfcdca');88 stroke.setWidth(1);89 styles[length++] = line;90 } else if (layer == 'tunnel' &&91 (cls == 'street' || cls == 'street_limited')) {92 stroke.setColor('#cfcdca');93 stroke.setWidth(1);94 styles[length++] = line;95 } else if (layer == 'tunnel' && cls == 'main' &&96 resolution <= 1222.99245256282) {97 stroke.setColor('#e9ac77');98 stroke.setWidth(1);99 styles[length++] = line;100 } else if (layer == 'tunnel' && cls == 'motorway') {101 stroke.setColor('#e9ac77');102 stroke.setWidth(1);103 styles[length++] = line;104 } else if (layer == 'tunnel' && cls == 'path') {105 stroke.setColor('#cba');106 stroke.setWidth(1);107 styles[length++] = line;108 } else if (layer == 'tunnel' && cls == 'major_rail') {109 stroke.setColor('#bbb');110 stroke.setWidth(2);111 styles[length++] = line;112 } else if (layer == 'road' && cls == 'motorway_link') {113 stroke.setColor('#e9ac77');114 stroke.setWidth(1);115 styles[length++] = line;116 } else if (layer == 'road' && (cls == 'street' ||117 cls == 'street_limited') && geom == 'LineString') {118 stroke.setColor('#cfcdca');119 stroke.setWidth(1);120 styles[length++] = line;121 } else if (layer == 'road' && cls == 'main' &&122 resolution <= 1222.99245256282) {123 stroke.setColor('#e9ac77');124 stroke.setWidth(1);125 styles[length++] = line;126 } else if (layer == 'road' && cls == 'motorway' &&127 resolution <= 4891.96981025128) {128 stroke.setColor('#e9ac77');129 stroke.setWidth(1);130 styles[length++] = line;131 } else if (layer == 'road' && cls == 'path') {132 stroke.setColor('#cba');133 stroke.setWidth(1);134 styles[length++] = line;135 } else if (layer == 'road' && cls == 'major_rail') {136 stroke.setColor('#bbb');137 stroke.setWidth(2);138 styles[length++] = line;139 } else if (layer == 'bridge' && cls == 'motorway_link') {140 stroke.setColor('#e9ac77');141 stroke.setWidth(1);142 styles[length++] = line;143 } else if (layer == 'bridge' && cls == 'motorway') {144 stroke.setColor('#e9ac77');145 stroke.setWidth(1);146 styles[length++] = line;147 } else if (layer == 'bridge' && cls == 'service') {148 stroke.setColor('#cfcdca');149 stroke.setWidth(1);150 styles[length++] = line;151 } else if (layer == 'bridge' &&152 (cls == 'street' || cls == 'street_limited')) {153 stroke.setColor('#cfcdca');154 stroke.setWidth(1);155 styles[length++] = line;156 } else if (layer == 'bridge' && cls == 'main' &&157 resolution <= 1222.99245256282) {158 stroke.setColor('#e9ac77');159 stroke.setWidth(1);160 styles[length++] = line;161 } else if (layer == 'bridge' && cls == 'path') {162 stroke.setColor('#cba');163 stroke.setWidth(1);164 styles[length++] = line;165 } else if (layer == 'bridge' && cls == 'major_rail') {166 stroke.setColor('#bbb');167 stroke.setWidth(2);168 styles[length++] = line;169 } else if (layer == 'admin' && adminLevel >= 3 && maritime === 0) {170 stroke.setColor('#9e9cab');171 stroke.setWidth(1);172 styles[length++] = line;173 } else if (layer == 'admin' && adminLevel == 2 &&174 disputed === 0 && maritime === 0) {175 stroke.setColor('#9e9cab');176 stroke.setWidth(1);177 styles[length++] = line;178 } else if (layer == 'admin' && adminLevel == 2 &&179 disputed === 1 && maritime === 0) {180 stroke.setColor('#9e9cab');181 stroke.setWidth(1);182 styles[length++] = line;183 } else if (layer == 'admin' && adminLevel >= 3 && maritime === 1) {184 stroke.setColor('#a0c8f0');185 stroke.setWidth(1);186 styles[length++] = line;187 } else if (layer == 'admin' && adminLevel == 2 && maritime === 1) {188 stroke.setColor('#a0c8f0');189 stroke.setWidth(1);190 styles[length++] = line;191 } else if (layer == 'country_label' && scalerank === 1) {192 text.getText().setText(feature.get('name_en'));193 text.getText().setFont('bold 11px "Open Sans", "Arial Unicode MS"');194 fill.setColor('#334');195 stroke.setColor('rgba(255,255,255,0.8)');196 stroke.setWidth(2);197 styles[length++] = text;198 } else if (layer == 'country_label' && scalerank === 2 &&199 resolution <= 19567.87924100512) {200 text.getText().setText(feature.get('name_en'));201 text.getText().setFont('bold 10px "Open Sans", "Arial Unicode MS"');202 fill.setColor('#334');203 stroke.setColor('rgba(255,255,255,0.8)');204 stroke.setWidth(2);205 styles[length++] = text;206 } else if (layer == 'country_label' && scalerank === 3 &&207 resolution <= 9783.93962050256) {208 text.getText().setText(feature.get('name_en'));209 text.getText().setFont('bold 9px "Open Sans", "Arial Unicode MS"');210 fill.setColor('#334');211 stroke.setColor('rgba(255,255,255,0.8)');212 stroke.setWidth(2);213 styles[length++] = text;214 } else if (layer == 'country_label' && scalerank === 4 &&215 resolution <= 4891.96981025128) {216 text.getText().setText(feature.get('name_en'));217 text.getText().setFont('bold 8px "Open Sans", "Arial Unicode MS"');218 fill.setColor('#334');219 stroke.setColor('rgba(255,255,255,0.8)');220 stroke.setWidth(2);221 styles[length++] = text;222 } else if (layer == 'marine_label' && labelrank === 1 &&223 geom == 'Point') {224 text.getText().setText(feature.get('name_en'));225 text.getText().setFont(226 'italic 11px "Open Sans", "Arial Unicode MS"');227 fill.setColor('#74aee9');228 stroke.setColor('rgba(255,255,255,0.8)');229 stroke.setWidth(1);230 styles[length++] = text;231 } else if (layer == 'marine_label' && labelrank === 2 &&232 geom == 'Point') {233 text.getText().setText(feature.get('name_en'));234 text.getText().setFont(235 'italic 11px "Open Sans", "Arial Unicode MS"');236 fill.setColor('#74aee9');237 stroke.setColor('rgba(255,255,255,0.8)');238 stroke.setWidth(1);239 styles[length++] = text;240 } else if (layer == 'marine_label' && labelrank === 3 &&241 geom == 'Point') {242 text.getText().setText(feature.get('name_en'));243 text.getText().setFont(244 'italic 10px "Open Sans", "Arial Unicode MS"');245 fill.setColor('#74aee9');246 stroke.setColor('rgba(255,255,255,0.8)');247 stroke.setWidth(1);248 styles[length++] = text;249 } else if (layer == 'marine_label' && labelrank === 4 &&250 geom == 'Point') {251 text.getText().setText(feature.get('name_en'));252 text.getText().setFont(253 'italic 9px "Open Sans", "Arial Unicode MS"');254 fill.setColor('#74aee9');255 stroke.setColor('rgba(255,255,255,0.8)');256 stroke.setWidth(1);257 styles[length++] = text;258 } else if (layer == 'place_label' && type == 'city' &&259 resolution <= 1222.99245256282) {260 text.getText().setText(feature.get('name_en'));261 text.getText().setFont('11px "Open Sans", "Arial Unicode MS"');262 fill.setColor('#333');263 stroke.setColor('rgba(255,255,255,0.8)');264 stroke.setWidth(1);265 styles[length++] = text;266 } else if (layer == 'place_label' && type == 'town' &&267 resolution <= 305.748113140705) {268 text.getText().setText(feature.get('name_en'));269 text.getText().setFont('9px "Open Sans", "Arial Unicode MS"');270 fill.setColor('#333');271 stroke.setColor('rgba(255,255,255,0.8)');272 stroke.setWidth(1);273 styles[length++] = text;274 } else if (layer == 'place_label' && type == 'village' &&275 resolution <= 38.21851414258813) {276 text.getText().setText(feature.get('name_en'));277 text.getText().setFont('8px "Open Sans", "Arial Unicode MS"');278 fill.setColor('#333');279 stroke.setColor('rgba(255,255,255,0.8)');280 stroke.setWidth(1);281 styles[length++] = text;282 } else if (layer == 'place_label' &&283 resolution <= 19.109257071294063 && (type == 'hamlet' ||284 type == 'suburb' || type == 'neighbourhood')) {285 text.getText().setText(feature.get('name_en'));286 text.getText().setFont('bold 9px "Arial Narrow"');287 fill.setColor('#633');288 stroke.setColor('rgba(255,255,255,0.8)');289 stroke.setWidth(1);290 styles[length++] = text;291 } else if (layer == 'poi_label' && resolution <= 19.109257071294063 &&292 scalerank == 1 && maki !== 'marker') {293 styles[length++] = getIcon(maki);294 } else if (layer == 'poi_label' && resolution <= 9.554628535647032 &&295 scalerank == 2 && maki !== 'marker') {296 styles[length++] = getIcon(maki);297 } else if (layer == 'poi_label' && resolution <= 4.777314267823516 &&298 scalerank == 3 && maki !== 'marker') {299 styles[length++] = getIcon(maki);300 } else if (layer == 'poi_label' && resolution <= 2.388657133911758 &&301 scalerank == 4 && maki !== 'marker') {302 styles[length++] = getIcon(maki);...
Using AI Code Generation
1const { openBrowser, goto, closeBrowser, setColor } = require('taiko');2(async () => {3 try {4 await openBrowser();5 await goto("google.com");6 await setColor("red");7 } catch (e) {8 console.error(e);9 } finally {10 await closeBrowser();11 }12})();
Using AI Code Generation
1const { openBrowser, goto, closeBrowser, setColor } = require('taiko');2(async () => {3 try {4 await openBrowser();5 await goto("google.com");6 await setColor("input[type=text]", "black");7 await closeBrowser();8 } catch (e) {9 console.error(e);10 } finally {11 }12})();13const { openBrowser, goto, closeBrowser, setColor } = require('taiko');14(async () => {15 try {16 await openBrowser();17 await goto("google.com");18 await setColor("input[type=text]", "black");19 await closeBrowser();20 } catch (e) {21 console.error(e);22 } finally {23 }24})();25const { openBrowser, goto, closeBrowser, setColor } = require('taiko');26(async () => {27 try {28 await openBrowser();29 await goto("google.com");30 await setColor("input[type=text]", "black");31 await closeBrowser();32 } catch (e) {33 console.error(e);34 } finally {35 }36})();37const { openBrowser, goto, closeBrowser, setColor } = require('taiko');38(async () => {39 try {40 await openBrowser();41 await goto("google.com");42 await setColor("input[type=text]", "black");43 await closeBrowser();44 } catch (e) {45 console.error(e);46 } finally {47 }48})();49const { openBrowser, goto, closeBrowser, setColor } = require('taiko');50(async () => {51 try {52 await openBrowser();53 await goto("google.com");54 await setColor("input[type=text]", "black");55 await closeBrowser();56 } catch (e) {57 console.error(e);58 } finally {59 }60})();61const { openBrowser, goto, closeBrowser, setColor } = require('taiko');62(async () => {63 try {64 await openBrowser();65 await goto("google.com");66 await setColor("input[type=text]", "black");67 await closeBrowser();68 } catch (e
Using AI Code Generation
1const { openBrowser, goto, closeBrowser, setColor } = require('taiko');2(async () => {3 try {4 await openBrowser();5 await goto('google.com');6 await setColor("red");7 } catch (e) {8 console.error(e);9 } finally {10 await closeBrowser();11 }12})();13const { openBrowser, goto, closeBrowser, setColor } = require('taiko');14(async () => {15 try {16 await openBrowser();17 await goto('google.com');18 await setColor("red");19 } catch (e) {20 console.error(e);21 } finally {22 await closeBrowser();23 }24})();
Using AI Code Generation
1setColor(0);2click("Click Me");3waitFor(5000);4write("Hello World");5press("Enter");6hover("Hover Me");7focus("Focus Me");8scrollDown();9scrollUp();10scrollTo("Scroll To Me");11scrollRight();12scrollLeft();13mouseAction("move", {x: 0, y: 0}, {x: 200, y: 300});14dragAndDrop("Drag Me", "Drop Me");15tap("Tap Me");16doubleTap("Double Tap Me");17rightClick("Right Click Me");18mouseUp();19mouseDown();20attach({headless: false});21closeBrowser();22evaluate(() => { return window.location.href; });23openBrowser({headless: false});24emulateNetwork("4G");25emulateDevice("iPhone 6");26accept();27reload();28screenshot({path: "screenshot.png"});
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!!