How to use __construct method of html class

Best Atoum code snippet using html.__construct

dom.php

Source:dom.php Github

copy

Full Screen

...16 17 //Store the element's contentEditable value18 protected $editable = "";19 20 public function __construct($id = "") {21 $this->id = $id;22 }23 24 //Set the id of the element25 public function setId($id) {26 $this->id = $id;27 }28 29 //Add a class to the element30 public function addClass($class) {31 $this->classes[] = $class;32 }33 34 //Append DOMobject or string to children of element35 public function addChild($child) {36 $this->children[] = $child;37 }38 39 //Set the element to editable40 public function setEditable() {41 $this->editable = "true";42 }43 44 //Return string representation of the element with given indent45 abstract public function render($indent);46 47 //Return string representation of all children elements48 protected function renderChildren($indent) {49 $html = "";50 foreach ($this->children as $child) {51 if (gettype($child) === "string") {52 $html .= $indent.$child."\n";53 } else {54 $html .= $child->render($indent);55 }56 }57 return $html;58 }59 60 //Return string representation of the id and class and contentEditable of the element in renderable form61 protected function renderIdClass() {62 $html = "";63 if ($this->id != "") {64 $html .= " id=\"".$this->id."\"";65 }66 if ($this->editable != "") {67 $html .= " contentEditable=\"".$this->editable."\"";68 }69 if (count($this->classes) > 0) {70 $html .= " class=\"";71 foreach ($this->classes as $class) {72 $html .= $class." ";73 }74 $html .= "\"";75 }76 return $html;77 }78 79}80//div class81class DOMdiv extends DOMobject {82 83 //Constructor is specified for clarity, despite being the same as the parent's84 public function __construct($id = "") {85 parent::__construct($id);86 }87 88 //Return string representation of the element with given indent89 public function render($indent) {90 $html = $indent;91 $html .= "<div";92 $html .= $this->renderIdClass();93 $html .= ">\n";94 $html .= $this->renderChildren($indent."\t");95 $html .= $indent."</div>\n";96 return $html;97 }98 99}100//a class101class DOMa extends DOMobject {102 103 //Store the link location104 private $href = "";105 106 107 public function __construct($id = "", $href = "") {108 parent::__construct($id);109 $this->href = $href;110 }111 112 //Return string representation of the element with given indent113 public function render($indent) {114 $html = $indent;115 $html .= "<a";116 $html .= $this->renderIdClass();117 if ($this->href != "") {118 $html .= " href=\"".$this->href."\"";119 }120 $html .= ">\n";121 $html .= $this->renderChildren($indent."\t");122 $html .= $indent."</a>\n";123 return $html;124 }125 126}127//input class128class DOMinput extends DOMobject {129 130 //Store appropriate fields131 private $type = "";132 private $value = "";133 private $placeholder = "";134 private $accept = "";135 private $multiple = "";136 137 public function __construct($id = "", $type = "") {138 parent::__construct($id);139 $this->type = $type;140 }141 142 public function setValue($value) {143 $this->value = $value;144 }145 146 public function setPlaceholder($placeholder) {147 $this->placeholder = $placeholder;148 }149 150 public function setAccept($accept) {151 $this->accept = $accept;152 }153 154 public function setMultiple($multiple) {155 $this->multiple = $multiple;156 }157 158 //Return string representation of the element with given indent159 public function render($indent) {160 $html = $indent;161 $html .= "<input";162 if ($this->type != "") {163 $html .= " type=\"".$this->type."\"";164 }165 $html .= $this->renderIdClass();166 if ($this->value != "") {167 $html .= " value=\"".$this->value."\"";168 }169 if ($this->placeholder != "") {170 $html .= " placeholder=\"".$this->placeholder."\"";171 }172 if ($this->accept != "") {173 $html .= " accept=\"".$this->accept."\"";174 }175 if ($this->multiple != "") {176 $html .= " multiple=\"".$this->multiple."\"";177 }178 $html .= " >\n";179 return $html;180 }181 182}183//img class184class DOMimg extends DOMobject {185 //Store image source and alt tag186 private $src = "";187 private $alt = "";188 189 public function __construct($id = "", $src = "", $alt = "") {190 parent::__construct($id);191 $this->src = $src;192 $this->alt = $alt;193 }194 195 //Return string representation of the element with given indent196 public function render($indent) {197 $html = $indent;198 $html .= "<img";199 $html .= $this->renderIdClass();200 if ($this->src != "") {201 $html .= " src=\"".$this->src."\"";202 }203 $html .= " alt=\"".$this->alt."\" >\n";204 return $html;205 }206 207}208class DOMh1 extends DOMobject {209 //Constructor is specified for clarity, despite being the same as the parent's210 public function __construct($id = "") {211 parent::__construct($id);212 }213 214 //Return string representation of the element with given indent215 public function render($indent) {216 $html = $indent;217 $html .= "<h1";218 $html .= $this->renderIdClass();219 $html .= ">\n";220 $html .= $this->renderChildren($indent."\t");221 $html .= $indent."</h1>\n";222 return $html;223 }224 225}226class DOMh2 extends DOMobject {227 //Constructor is specified for clarity, despite being the same as the parent's228 public function __construct($id = "") {229 parent::__construct($id);230 }231 232 //Return string representation of the element with given indent233 public function render($indent) {234 $html = $indent;235 $html .= "<h2";236 $html .= $this->renderIdClass();237 $html .= ">\n";238 $html .= $this->renderChildren($indent."\t");239 $html .= $indent."</h2>\n";240 return $html;241 }242 243}244class DOMh3 extends DOMobject {245 //Constructor is specified for clarity, despite being the same as the parent's246 public function __construct($id = "") {247 parent::__construct($id);248 }249 250 //Return string representation of the element with given indent251 public function render($indent) {252 $html = $indent;253 $html .= "<h3";254 $html .= $this->renderIdClass();255 $html .= ">\n";256 $html .= $this->renderChildren($indent."\t");257 $html .= $indent."</h3>\n";258 return $html;259 }260 261}262class DOMp extends DOMobject {263 //Constructor is specified for clarity, despite being the same as the parent's264 public function __construct($id = "") {265 parent::__construct($id);266 }267 268 //Return string representation of the element with given indent269 public function render($indent) {270 $html = $indent;271 $html .= "<p";272 $html .= $this->renderIdClass();273 $html .= ">\n";274 $html .= $this->renderChildren($indent."\t");275 $html .= $indent."</p>\n";276 return $html;277 }278 279}280class DOMul extends DOMobject {281 //Constructor is specified for clarity, despite being the same as the parent's282 public function __construct($id = "") {283 parent::__construct($id);284 }285 286 //Return string representation of the element with given indent287 public function render($indent) {288 $html = $indent;289 $html .= "<ul";290 $html .= $this->renderIdClass();291 $html .= ">\n";292 $html .= $this->renderChildren($indent."\t");293 $html .= $indent."</ul>\n";294 return $html;295 }296 297}298class DOMli extends DOMobject {299 //Constructor is specified for clarity, despite being the same as the parent's300 public function __construct($id = "") {301 parent::__construct($id);302 }303 304 //Return string representation of the element with given indent305 public function render($indent) {306 $html = $indent;307 $html .= "<li";308 $html .= $this->renderIdClass();309 $html .= ">\n";310 $html .= $this->renderChildren($indent."\t");311 $html .= $indent."</li>\n";312 return $html;313 }314 315}316class DOMselect extends DOMobject {317 //Constructor is specified for clarity, despite being the same as the parent's318 public function __construct($id = "") {319 parent::__construct($id);320 }321 322 //Return string representation of the element with given indent323 public function render($indent) {324 $html = $indent;325 $html .= "<select";326 $html .= $this->renderIdClass();327 $html .= ">\n";328 $html .= $this->renderChildren($indent."\t");329 $html .= $indent."</select>\n";330 return $html;331 }332}333class DOMoption extends DOMobject {334 335 //Store appropriate fields336 private $value = "";337 private $selected = "";338 private $disabled = "";339 private $hidden = "";340 341 public function __construct($id = "", $value = "", $child = "") {342 parent::__construct($id);343 $this->value = $value;344 if ($child != "") {345 $this->addChild($child);346 }347 }348 349 //Set the option to selected350 public function select() {351 $this->selected = "selected";352 }353 354 public function disable() {355 $this->disabled = "disabled";356 }357 358 public function hide() {359 $this->hidden = "hidden";360 }361 362 //Return string representation of the element with given indent363 public function render($indent) {364 $html = $indent;365 $html .= "<option";366 $html .= $this->renderIdClass();367 if ($this->value != "") {368 $html .= " value=\"".$this->value."\"";369 }370 if ($this->selected != "") {371 $html .= " ".$this->selected;372 }373 if ($this->disabled != "") {374 $html .= " ".$this->disabled;375 }376 if ($this->hidden != "") {377 $html .= " ".$this->hidden;378 }379 $html .= ">\n";380 $html .= $this->renderChildren($indent."\t");381 $html .= $indent."</option>\n";382 return $html;383 }384}385class DOMspan extends DOMobject {386 //Constructor is specified for clarity, despite being the same as the parent's387 public function __construct($id = "") {388 parent::__construct($id);389 }390 391 //Return string representation of the element with given indent392 public function render($indent) {393 $html = $indent;394 $html .= "<span";395 $html .= $this->renderIdClass();396 $html .= ">\n";397 $html .= $this->renderChildren($indent."\t");398 $html .= $indent."</span>\n";399 return $html;400 }401 402}403//textarea class404class DOMtextarea extends DOMobject {405 406 //Constructor is specified for clarity, despite being the same as the parent's407 public function __construct($id = "") {408 parent::__construct($id);409 }410 411 //Return string representation of the element with given indent412 public function render($indent) {413 $html = $indent;414 $html .= "<textarea";415 $html .= $this->renderIdClass();416 $html .= ">";417 $html .= $this->renderChildren("");418 $html .= "</textarea>\n";419 return $html;420 }421 422}423//button class424class DOMbutton extends DOMobject {425 private $value = "";426 427 //Allow user to save inner text from constructor428 public function __construct($id = "", $innerText = "") {429 parent::__construct($id);430 if ($innerText != "") {431 $this->children[] = $innerText;432 }433 }434 435 public function setValue($value) {436 $this->value = $value;437 }438 439 //Return string representation of the element with given indent440 public function render($indent) {441 $html = $indent;442 $html .= "<button";443 $html .= $this->renderIdClass();444 if ($this->value != "") {445 $html .= " value=\"".$this->value."\"";446 }447 $html .= ">\n";448 $html .= $this->renderChildren($indent."\t");449 $html .= $indent."</button>\n";450 return $html;451 }452 453}454class DOMhtml extends DOMobject {455 456 public function __construct() {457 parent::__construct("");458 }459 460 //Return string representation of the element with given indent461 public function render($indent) {462 $html = $indent."<!doctype html>\n".$indent;463 $html .= "<html>\n";464 $html .= $this->renderChildren($indent."\t");465 $html .= $indent."</html>\n";466 return $html;467 }468 469}470class DOMhead extends DOMobject {471 472 public function __construct() {473 parent::__construct("");474 }475 476 //Return string representation of the element with given indent477 public function render($indent) {478 $html = $indent;479 $html .= "<head>\n";480 $html .= $this->renderChildren($indent."\t");481 $html .= $indent."</head>\n";482 return $html;483 }484 485}486class DOMbody extends DOMobject {487 488 public function __construct() {489 parent::__construct("");490 }491 492 //Return string representation of the element with given indent493 public function render($indent) {494 $html = $indent;495 $html .= "<body>\n";496 $html .= $this->renderChildren($indent."\t");497 $html .= $indent."</body>\n";498 return $html;499 }500 501}502class DOMtitle extends DOMobject {503 504 public function __construct($title = "") {505 parent::__construct("");506 if ($title != "") {507 $this->children[] = $title;508 }509 }510 511 //Return string representation of the element with given indent512 public function render($indent) {513 $html = $indent;514 $html .= "<title>\n";515 $html .= $this->renderChildren($indent."\t");516 $html .= $indent."</title>\n";517 return $html;518 }519 520}521class DOMmeta extends DOMobject {522 523 //Store appropriate fields524 //type can be charset, http-equiv, or name525 private $type = "";526 private $value = "";527 private $content = "";528 529 public function __construct($type = "", $value = "", $content = "") {530 parent::__construct("");531 $this->type = $type;532 $this->value = $value;533 $this->content = $content;534 }535 536 //Return string representation of the element with given indent537 public function render($indent) {538 $html = $indent;539 $html .= "<meta ".$this->type."=\"".$this->value."\"";540 if ($this->content != "") {541 $html .= " content=\"".$this->content."\"";542 }543 $html .= " >\n";544 return $html;545 }546 547}548class DOMstyle extends DOMobject {549 550 public function __construct() {551 parent::__construct("");552 }553 554 //Return string representation of the element with given indent555 public function render($indent) {556 $html = $indent;557 $html .= "<style type=\"text/css\">\n";558 $html .= $this->renderChildren($indent."\t");559 $html .= $indent."</style>\n";560 return $html;561 }562 563}564class DOMlink extends DOMobject {565 566 //Store appropriate fields567 private $rel = "";568 private $type = "";569 private $href = "";570 571 public function __construct($rel = "stylesheet", $type = "text/css", $href = "/css/style.css") {572 parent::__construct("");573 $href = $this->cssPath; //Delete for deployment574 $this->rel = $rel;575 $this->type = $type;576 $this->href = $href;577 }578 579 //Return string representation of the element with given indent580 public function render($indent) {581 $html = $indent;582 $html .= "<link rel=\"".$this->rel."\" type=\"".$this->type."\" href=\"".$this->href."\">\n";583 return $html;584 }585 586}587class DOMscript extends DOMobject {588 589 //Store source link590 private $src = "";591 592 public function __construct($src = "/js/main.js") {593 parent::__construct("");594 $src = $this->jsPath; //Delete for deployment595 $this->src = $src;596 }597 598 //Return string representation of the element with given indent599 public function render($indent) {600 $html = $indent;601 $html .= "<script src=\"".$this->src."\">\n";602 $html .= $indent."</script>\n";603 return $html;604 }605 606}607?>...

Full Screen

Full Screen

class.HTML.php

Source:class.HTML.php Github

copy

Full Screen

...11 }12}13class HTML_GROUP extends HTML {14 protected $items = array();15 function __construct($items) {16 if(!is_array($items)){17 throw new Exception('Invalid parameter type at HTML group');18 }19 $this->items = $items;20 $this->result = "";21 }22 function buildHTML() {23 $out = "";24 foreach($this->items as $item) {25 if ($item instanceof HTML) {26 $out .= $item->outerHTML();27 } else if ($item instanceof Ad_Empty) {28 $out .= $item->outerHTML();29 } else {30 $out .= $item;31 }32 }33 $this->result = $out;34 }35 function outerHTML(){36 if ($this->result == "") {37 $this->buildHTML();38 }39 return ($this->result);40 }41}42class HTML_GROUP_BR extends HTML_GROUP {43 function buildHTML() {44 $out = "";45 foreach($this->items as $item) {46 $out .= $item."<br />";47 }48 $out = cutlast($out, 6);49 $this->result = $out;50 }51}52class HTML_GROUP_LI extends HTML_GROUP {53 function buildHTML() {54 $out = "";55 $my_entry = "";56 foreach($this->items as $item) {57 $obj = new HTML_DIV( array("class"=>"li_entry"), $item );58 $out .= "<li>". $obj->outerHTML(). "</li>";59 }60 $this->result = $out;61 }62}63abstract class HTML_WRAP extends HTML{64 protected $attributes;65 protected $attribute_string;66 protected function __construct($attributes){67 if(!is_array($attributes)){68 throw new Exception('Invalid attribute type');69 }70 $this->attributes=$attributes;71 $this->buildATTR();72 }73 protected function buildATTR() {74 $out = "";75 foreach($this->attributes as $attribute => $value){76 $out .= $attribute.'="'.$value.'" ';77 }78 $this->attribute_string = $out;79 }80 function outerHTML(){81 return ($this->result . "\n");82 }83}84abstract class HTML_ELEMENT extends HTML{85 protected $attributes;86 protected $attribute_string;87 protected function __construct($attributes){88 if(!is_array($attributes)){89 throw new Exception('Invalid attribute type');90 }91 $this->attributes=$attributes;92 $this->buildATTR();93 }94 protected function buildATTR() {95 $out = "";96 foreach($this->attributes as $attribute => $value){97 $out .= $attribute.'="'.$value.'" ';98 }99 $this->attribute_string = $out;100 }101}102// Div HTML103class HTML_DIV extends HTML_ELEMENT{104 protected $data;105 protected $type;106 protected $innerhtml;107 function __construct($attributes = array(), $data){108 if ( is_string($data) || is_numeric($data) || $data == null ) $this->type = 1; // feb28109 else if (is_array($data)) $this->type = 2;110 else if ($data instanceof HTML) $this->type = 3;111 else throw new Exception('Invalid parameter type at HTML_DIV class');112 parent::__construct($attributes);113 $this->result = "";114 $this->innerhtml = "";115 $this->data = $data;116 }117 function innerHTML(){118 $out = "";119 switch ($this->type) {120 case(1):121 $out .= $this->data;122 break;123 case(2):124 $group = new HTML_GROUP($this->data);125 $out .= $group->outerHTML();126 break;127 case(3):128 $out .= $this->data->outerHTML();129 break;130 }131 return $this->innerhtml = $out;132 }133 function outerHTML(){134 if ($this->innerhtml == "") $this->innerHTML();135 if ($this->result == "") {136 $out = "<div ".$this->attribute_string.">" . CRLF . $this->innerhtml . "</div>";137 $this->result = $out;138 }139 return ($this->result . CRLF);140 }141}142// 'Unordered List Wrapper' class143class HTML_UL_WRAP extends HTML_WRAP {144 function __construct($attributes=array(), $data){145 parent::__construct($attributes);146 if(!is_string($data)){147 throw new Exception('Invalid parameter for UL Wrapper');148 }149 $this->result = "<ul ".$this->attribute_string.">\n".$data."</ul>\n";150 }151}152// 'Ordered List Wrapper' class153class HTML_OL_WRAP extends HTML_WRAP {154 function __construct($attributes=array(), $data){155 parent::__construct($attributes);156 if(!is_string($data)){157 throw new Exception('Invalid parameter for UL Wrapper');158 }159 $this->result = "<ol ".$this->attribute_string.">\n".$data."</ol>\n";160 }161}162// 'Ordered List' class163class HTML_OL extends HTML_DIV{164 private $items = array();165 function __construct($attributes=array(), $items=array()){166 parent::__construct($attributes, $items);167 if(!is_array($items)){168 throw new Exception('Invalid parameter for list items');169 }170 $this->items = $items;171 }172 function innerHTML(){173 $out = "";174 foreach($this->items as $item){175 $out .= ($item instanceof HTML) ? $item->outerHTML() : $item;176 }177 return $this->innerhtml = "\n" . $out;178 }179 function outerHTML(){180 if ($this->innerhtml == "") $this->innerHTML();181 if ($this->result == "") {182 $out = "<ol ".$this->attribute_string.">\n".$this->innerhtml."</ol>\n";183 $this->result = $out;184 }185 return ($this->result . "\n");186 }187}188// 'Unordered List' class189class HTML_UL extends HTML_DIV{190 private $items = array();191 function __construct($attributes=array(), $items=array()){192 parent::__construct($attributes, $items);193 if(!is_array($items)){194 throw new Exception('Invalid parameter for list items');195 }196 $this->items = $items;197 }198 function innerHTML(){199 $out = "";200 foreach($this->items as $item){201 $out .= ($item instanceof HTML) ? $item->outerHTML() : $item;202 }203 return $this->innerhtml = "\n" . $out;204 }205 function outerHTML(){206 if ($this->innerhtml == "") $this->innerHTML();207 if ($this->result == "") {208 $out = "<ul ".$this->attribute_string.">\n".$this->innerhtml."</ul>\n";209 $this->result = $out;210 }211 return ($this->result . "\n");212 }213}214// 'Select Wrapper' class215class HTML_SELECT_WRAP extends HTML_WRAP {216 function __construct($attributes=array(), $data){217 parent::__construct($attributes);218 if(!is_string($data)){219 throw new Exception('Invalid parameter for LI Wrapper');220 }221 $this->result = "<select ".$this->attribute_string.">" . CRLF. $data. CRLF. '</select>'. CRLF;222 }223}224// 'List Item Wrapper' class225class HTML_LI_WRAP extends HTML_WRAP {226 function __construct($attributes=array(), $data){227 parent::__construct($attributes);228 if(!is_string($data)){229 throw new Exception('Invalid parameter for LI Wrapper');230 }231 $this->result = "<li ".$this->attribute_string.">" . CRLF . $data."</li>" . CRLF;232 }233}234// 'List Item' class235class HTML_LI extends HTML_ELEMENT {236 private $items;237 private $data;238 private $type;239 private $innerhtml;240 public function __construct($attributes=array(), $data){241 if(!$data instanceof HTML && !is_string($data) && !is_array($data)){242 throw new Exception('Invalid parameter type at HTML_LI class');243 }244 parent::__construct($attributes);245 if (is_string($data)) {246 $this->data = $data;247 $this->type = 1;248 } else if (is_array($data)) {249 $this->items = $data;250 $this->type = 2;251 } else if ($data instanceof HTML) {252 $this->data = $data;253 $this->type = 3;254 } else {255 throw new Exception('Invalid parameter type at HTML_LI class');256 }257 }258 private function innerHTML(){259 $out = "";260 switch ($this->type) {261 case(1): $out .= $this->data;262 break;263 case(2): $group = new HTML_GROUP_LI($this->items);264 $out .= $group->outerHTML();265 break;266 case(3): $out .= $this->data->outerHTML();267 break;268 }269 return ($out. "\n");270 }271 public function outerHTML(){272 if ($this->innerhtml == "") {273 $this->innerhtml = $this->innerHTML();274 }275 return($this->innerhtml);276/*277 if ($this->result == "") {278 $out = "<ul ".$this->attribute_string.">\n".$this->innerhtml."</ul>"; // strange? feb 14, 2011279 $this->result = $out;280 }281 return ($this->result . "\n");282*/283 }284} // end of class HTML_LI285// 'Image' class286class HTML_IMG extends HTML_WRAP{287 function __construct($attributes = array()){288 parent::__construct($attributes);289 $this->result = "<img " . $this->attribute_string . " />";290 }291}292// 'Anchor' class293class HTML_A extends HTML_WRAP{294 function __construct($attributes = array(), $data){295 parent::__construct($attributes);296 $this->result = "<a " . $this->attribute_string . ">" . $data . "</a>";297 }298}299// 'Header' classes300class HTML_H1 extends HTML_WRAP{301 function __construct($attributes = array(), $data){302 parent::__construct($attributes);303 $this->result = "<h1 " . $this->attribute_string . ">" . $data . "</h1>";304 }305}306class HTML_H2 extends HTML_WRAP{307 function __construct($attributes = array(), $data){308 parent::__construct($attributes);309 $this->result = "<h2 " . $this->attribute_string . ">" . $data . "</h2>";310 }311}312class HTML_H3 extends HTML_WRAP{313 function __construct($attributes = array(), $data){314 parent::__construct($attributes);315 $this->result = "<h3 " . $this->attribute_string . ">" . $data . "</h3>";316 }317}318class HTML_FORM extends HTML_DIV{319 function __construct($attributes = array(), $data){320 parent::__construct($attributes, $data);321 }322 function outerHTML(){323 if ($this->innerhtml == "") $this->innerHTML();324 if ($this->result == "") {325 $out = "<form " . $this->attribute_string . ">" . CRLF . $this->innerhtml . "</form>";326 $this->result = $out;327 }328 return ($this->result . CRLF);329 }330}331// 'Paragraph' class332class HTML_P extends HTML_DIV {333 function __construct($attributes=array(), $data){334 parent::__construct($attributes, $data);335 }336 function innerHTML(){337 $out = "";338 switch ($this->type) {339 case(1):340 if ($this->data == "") {341 $out .= "<br />";342 } else {343 $out .= $this->data;344 }345 break;346 case(2):347 $group = new HTML_GROUP_BR($this->data); // array entries are separated by <br />348 $out .= $group->outerHTML();349 break;350 case(3):351 $out .= $this->data->outerHTML();352 break;353 default:354 throw new Exception('Invalid paragraph type at HTML_P');355 break;356 }357 return $this->innerhtml = $out;358 }359 function outerHTML(){360 if ($this->innerhtml == "") {361 $this->innerHTML();362 }363 if ($this->result == "") {364 $this->result = "<p ".$this->attribute_string.">\n" . $this->innerhtml . "</p>";365 }366 return ($this->result . CRLF);367 }368}369// 'Input' class370class HTML_INPUT extends HTML_DIV {371 function __construct($attributes=array(), $data){372 parent::__construct($attributes, $data);373 }374 function outerHTML(){375 if ($this->innerhtml == "") $this->innerHTML();376 if ($this->result == "") {377 $this->result = "<input ".$this->attribute_string.">" . $this->innerhtml . "</input>";378 }379 return ($this->result . CRLF);380 }381}382// 'Button' class383class HTML_BUTTON extends HTML_INPUT {384 function __construct($attributes=array(), $data){385 parent::__construct($attributes, $data);386 }387 function outerHTML(){388 if ($this->innerhtml == "") $this->innerHTML();389 if ($this->result == "") {390 $this->result = "<button ".$this->attribute_string.">" . $this->innerhtml . "</button>";391 }392 return ($this->result . CRLF);393 }394}395// 'Textarea' class396class HTML_TEXTAREA extends HTML_DIV {397 function __construct($attributes=array(), $data){398 parent::__construct($attributes, $data);399 }400 function outerHTML(){401 if ($this->innerhtml == "") $this->innerHTML();402 if ($this->result == "") {403 $this->result = "<textarea ".$this->attribute_string.">" . $this->innerhtml . "</textarea>";404 }405 return ($this->result . CRLF);406 }407}408// 'Span' class409class HTML_SPAN extends HTML_DIV {410 function __construct($attributes=array(), $data){411 parent::__construct($attributes, $data);412 }413 function outerHTML(){414 if ($this->innerhtml == "") $this->innerHTML();415 if ($this->result == "") {416 $this->result = "<span ".$this->attribute_string.">" . $this->innerhtml . "</span>";417 }418 return ($this->result . CRLF);419 }420}421// 'TABLE' class422class HTML_TABLE extends HTML_DIV {423 function __construct($attributes=array(), $data){424 parent::__construct($attributes, $data);425 }426 function outerHTML(){427 if ($this->innerhtml == "") $this->innerHTML();428 if ($this->result == "") {429 $this->result = "<table ".$this->attribute_string.">" . $this->innerhtml . "</table>";430 }431 return ($this->result . CRLF);432 }433}434// 'TR' class435class HTML_TR extends HTML_DIV {436 function __construct($attributes=array(), $data){437 parent::__construct($attributes, $data);438 }439 function outerHTML(){440 if ($this->innerhtml == "") $this->innerHTML();441 if ($this->result == "") {442 $this->result = "<tr ".$this->attribute_string.">" . $this->innerhtml . "</tr>";443 }444 return ($this->result . CRLF);445 }446}447// 'TD' class448class HTML_TD extends HTML_DIV {449 function __construct($attributes=array(), $data){450 parent::__construct($attributes, $data);451 }452 function outerHTML(){453 if ($this->innerhtml == "") $this->innerHTML();454 if ($this->result == "") {455 $this->result = "<td ".$this->attribute_string.">" . $this->innerhtml . "</td>";456 }457 return ($this->result . CRLF);458 }459}460// 'TD_LIST' class461class HTML_TD_LIST extends HTML_DIV {462 function __construct($attributes=array(), $data){463 parent::__construct($attributes, $data);464 }465 function innerHTML() {466 $out = "";467 foreach ($this->data as $td_data) {468 $tmp = new HTML_TD( $this->attributes, $td_data);469 $out .= $tmp->outerHTML();470 }471 $this->innerhtml = $out;472 }473 function outerHTML(){474 if ($this->innerhtml == "") $this->innerHTML();475 if ($this->result == "") {476 $this->result = $this->innerhtml;477 }478 return ($this->result . CRLF);479 }480}481class HTML_TD1 extends HTML_DIV {482 function __construct($attributes=array(), $data){483 parent::__construct($attributes, $data);484 }485 function outerHTML(){486 if ($this->result == "") {487 $this->result = "<td ". $this->attribute_string.">" . $this->data . "</td>";488 }489 return ($this->result . CRLF);490 }491}492// 'TH' class493class HTML_TH extends HTML_DIV {494 function __construct($attributes=array(), $data){495 parent::__construct($attributes, $data);496 }497 function outerHTML(){498 if ($this->result == "") {499 $this->result = "<th ". $this->attribute_string.">" . $this->data . "</th>";500 }501 return ($this->result . CRLF);502 }503}504// 'TH_LIST' class505class HTML_TH_LIST extends HTML_DIV {506 function __construct($attributes=array(), $data){507 parent::__construct($attributes, $data);508 }509 function innerHTML() {510 $out = "";511 foreach ($this->data as $td_data) {512 $tmp = new HTML_TH( $this->attributes, $td_data);513 $out .= $tmp->outerHTML();514 }515 $this->innerhtml = $out;516 }517 function outerHTML(){518 if ($this->innerhtml == "") $this->innerHTML();519 if ($this->result == "") {520 $this->result = $this->innerhtml;521 }522 return ($this->result . CRLF);523 }524}525class HTML_FLASH extends HTML_ELEMENT {526 function __construct ($url, $width, $height, $id, $bg, $vars, $wmode){527 $out = "<object classid='clsid:d27cdb6e-ae6d-11cf-96b8-444553540000' ";528 $out .= "codebase='http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0' ";529 $out .= "width='" . $width . "' ";530 $out .= "height='" . $height . "' ";531 $out .= "id='" . $id . "' ";532 $out .= "align='middle'>" . CRLF;533 $out .= "<param name='allowScriptAccess' value='always' />";534 $out .= "<param name='movie' value='" . $url . "' />";535 $out .= "<param name='FlashVars' value='" . $vars . "' />";536 $out .= "<param name='wmode' value='" . $wmode . "' />";537 $out .= "<param name='menu' value='false' />";538 $out .= "<param name='quality' value='high' />";539 $out .= "<param name='bgcolor' value='" . $bg . "' />" . CRLF;540 $out .= "<embed src='" . $url . "' ";...

Full Screen

Full Screen

htmlLibrary.php

Source:htmlLibrary.php Github

copy

Full Screen

...35 * paznje na otvarajuce i zatvarajuce tagove .36 * @param $name37 * @param bool $closed38 */39 #[Pure] public function __construct($name, $closed = true){40 $this->closed = $closed;41 $this->name = $name;42 $this->attributes = [];43 $this->children = new HTMLCollection();44 }45 /**46 * Elementu dodaje novo dijete.47 *48 * @param HTMLNode $node novo dijete49 * @return integer pozicija dodanog djeteta unutar polje djece50 */51 public function add_child(HTMLNode $node): int52 {53 return $this -> children -> add($node);54 }55 /**56 * Elementu dodaje cijelu kolekciju elemenata koji ce biti njegova57 * djeca .58 *59 * @param HTMLCollection $collection kolekcija elemenata koja60 * predstavlja djecu61 */62 public function add_children(HTMLCollection $collection){63 $this -> children = $collection;64 }65 /**66 * Vraca dijete koje se nalazi na zadanoj poziciji .67 *68 * @param $position69 * @return mixed HTMLNode dijete na zadanoj poziciji70 */71 public function get_child($position) : HTMLNode72 {73 return $this -> children -> get($position);74 }75 /**76 * Vraca trenutni broj djece elementa .77 *78 * @return integer broj djece elementa79 */80 #[Pure] public function get_children_number(): int81 {82 return $this -> children -> size();83 }84 /**85 * Uklanje dijete koje se nalazi na poziciji odredjenoj parametrom .86 *87 * @param integer $position pozicija na kojoj se nalazi dijete88 * koje je potrebno ukloniti89 */90 public function remove_child(int $position){91 $this -> children -> delete($position);92 }93 /**94 * Obavlja dodavanje novog atributa.95 *96 * @param HTMLAttribute $attribute novi atribut elementa97 */98 public function add_attribute(HTMLAttribute $attribute){99 array_push($this -> attributes, $attribute);100 }101 /**102 * Iz polja atributa uklanja atribut zadanog imena.103 * @param string $attribute naziv atributa koji je potrebno ukloniti104 */105 public function remove_attribute(string $attribute){106 foreach($this -> attributes as $key => $value){107 if($value -> get_name() === $attribute){108 array_splice($this -> attributes, $key, 1);109 }110 }111 }112 /**113 * Vraca naziv elementa.114 * @return string naziv elementa115 */116 public function get_name(): string117 {118 return $this -> name;119 }120 /**121 * Pretvara objekt u niz znakova122 */123 public function __toString(): string124 {125 return $this -> get_html();126 }127 protected function get_head_tag(): string128 {129 return "<head>";130 }131 protected function get_tail_tag(): string132 {133 return "<tail>";134 }135 public function get_html(): string136 {137 $return = "<" . $this -> name . " ";138 foreach($this -> attributes as $attribute){139 $return .= strval($attribute);140 }141 $return .= ">" . $this -> children -> get_html_collection();142 if($this -> closed){143 $return .= "</" . $this -> name . ">";144 }145 return $return;146 }147}148/**149 * Implementacija cvor koji predstavlja150 */151class HTMLTextNode extends HTMLNode{152 /**153 * Sadrzaj tekstualnog cvora154 */155 private string $text;156 /**157 * Stvara novo tekstualni cvor zadanog sadrzaja158 * @param string $text tekst cvora159 */160 public function __construct(string $text){161 $this->text = $text;162 }163 /**164 * Alias metode __toString u situacijama kada bi ova165 * metoda bila semanticki ispravnija166 */167 public function get_text(): string168 {169 return $this -> text;170 }171 /**172 * Vraca sadrzaj cvora .173 */174 public function __toString(): string175 {176 return $this -> text;177 }178 #[Pure] public function get_html(): string179 {180 return $this -> get_text();181 }182}183/**184 * Implementacija HTML atributa185 */186class HTMLAttribute187{188 /**189 * Naziv atributa190 * @var string191 */192 private string $name;193 /**194 * Vrijednost atributa koja moze biti niz znakova ako se radi o195 * samo jednoj vrijednosti , odnosno polje ako se radi o vise vrijednosti.196 * @var mixed197 */198 private $value;199 /**200 * Kreira novi atribut prema zadanom imenu i vrijednosti201 *202 * @param string $name naziv atributa203 * @param mixed $value vrijednost ( string ) ili vrijednosti ( array ) atributa204 */205 public function __construct(string $name, mixed $value)206 {207 $this->name = $name;208 $this->value = $value;209 }210 /**211 * Atributu dodaje jednu novu vrijednost . Nije dozvoljeno212 * duplicirati vrijednosti .213 * @param $value214 */215 public function add_value($value) : void216 {217 if(!($this -> $value === $value || in_array($value, $this -> value))){218 if(gettype($this -> value) === "string"){219 $this -> value = [$this -> value];220 }221 array_push($this -> value, $value);222 }223 }224 /**225 * Atributu dodaje vise novih vrijednosti. Potrebno je paziti226 * da ne dodje do dupliciranja vrijednosti.227 * @param $values228 */229 public function add_values($values) : void230 {231 foreach($values as $value){232 $this -> add_value($value);233 }234 }235 /**236 * Uklanja postojecu vrijednost atributa.237 * @param string $value vrijednost koju je potrebno ukloniti238 */239 public function remove_value(string $value)240 {241 if(gettype($this -> value) === "string"){242 if($this -> value === $value) $this -> value = null;243 }else{244 if (($key = array_search($value, $this -> value)) !== false) {245 #unset($this -> value[$key]);246 array_splice($this -> value, $key, 1);247 }248 }249 }250 /**251 * Vraca naziv atributa252 *253 * @return string naziv atributa254 */255 public function get_name(): string256 {257 return $this->name;258 }259 /**260 * Vraca vrijednosti atributa u formatu pogodnom za zapis u tagu.261 * Ex: key = "value"262 * Vraca se "value"263 */264 #[Pure] public function get_values(): string265 {266 if(gettype($this -> value) === "string") {267 return "'" . $this->value . "'";268 }else{269 $res = "'";270 foreach($this -> value as $v){271 $res .= strval($v) . " ";272 }273 $res .= "'";274 }275 return $res;276 }277 /**278 * Zapisuje atribut i njegove vrijednosti pomocu279 * niza znakova.280 */281 #[Pure] public function __toString(): string282 {283 return $this -> name . "=" . $this->get_values();284 }285}286class HTMLCollection287{288 /**289 * Polje cvorova koji su dio kolekcije290 * @var HTMLNode291 */292 private array $nodes;293 /**294 * Stvara novu kolekciju i puni je cvorovima ako je barem jedan,295 * predan metodi. Pozicija svakog umetnutog cvora odgovara296 * poziciji cvora u predanom polju.297 *298 * @param array $nodes polje cvorova koje je potrebno ubaciti u kolekciju299 */300 public function __construct($nodes = [])301 {302 $this->nodes = $nodes;303 }304 /**305 * Umece novi cvor u kolekciju cvorova . Cvor se umece na306 * kraj polja, tako da njegovo mjesto uvijek odgovara307 * do tada umetnutom broju cvorova.308 *309 * @param HTMLNode $node cvor koji je potrebno umetnuti310 * @return integer mjesto unutar kolekcije na koje je cvor umetnut311 */312 public function add(HTMLNode $node): int313 {314 array_push($this -> nodes, $node);315 return key(array_slice($this -> nodes, -1, 1, true));316 }317 /**318 * Dohvaca cvor kolekcije s tocno odredjene pozicije319 *320 * @param integer $position pozicija cvora koji je potrebno dohvatiti321 * @return HTMLNode cvor s trazene pozicije322 */323 public function get(int $position) : HTMLNode324 {325 return $this->nodes[$position];326 }327 /**328 * Vraca sve elemente kolekcije.329 * @return array elementi kolekcije330 */331 public function get_all(): array332 {333 return $this->nodes;334 }335 /**336 * Vraca informaciju o velicini kolekcije.337 * @return integer broj elemenata kolekcije338 */339 #[Pure] public function size(): int340 {341 return sizeof($this->nodes);342 }343 /**344 * Brise element s tocno odredene pozicije iz kolekcije .345 * @param $position346 */347 public function delete($position)348 {349 array_splice($this -> nodes, $position, 1);350 }351 public function get_html_collection(): string352 {353 $nodes = "";354 foreach ($this->nodes as $node) {355 $nodes .= $node->get_html();356 }357 return $nodes;358 }359}360class HTMLHtmlElement extends HTMLElement {361 #[Pure] public function __construct () {362 parent :: __construct ("html", true);363 }364 /**365 * @return string366 */367 public function get_html() : string368 {369 $html = " <! doctype html >";370 $html .= $this -> get_head_tag();371 $html .= $this -> children -> get_html_collection();372 $html .= $this -> get_tail_tag();373 return $html;374 }375}376class HTMLHeadElement extends HTMLElement {377 #[Pure] public function __construct(){378 parent :: __construct ("head", true);379 }380}381class HTMLBodyElement extends HTMLElement {382 #[Pure] public function __construct(){383 parent :: __construct ("body", true);384 }385}386class HTMLTableElement extends HTMLElement {387 #[Pure] public function __construct(){388 parent :: __construct ("table", true);389 }390 /**391 * Dodaje novi redak tablice. Ako je predani parametar jednak 'null',392 * tada se dodaje novi prazan redak tablice.393 *394 * @param HTMLRowElement $row novi redak koji se dodaje395 * @return integer pozicija umetnutog retka396 */397 public function add_row(HTMLRowElement $row = null): int398 {399 if($row === null) $row = new HTMLRowElement();400 return $this -> add_child($row);401 }402 /**403 * Dodaje vise novih redaka tablice . Ako je predani parametar prazno polje ,404 * tada se dodaje samo jedan prazan redak .405 *406 * @param { HTMLRowElement } $row novi retci koje je potrebno umetnuti407 */408 public function add_rows($rows = []) {409 foreach ($rows as $row) {410 $this -> add_child($row);411 }412 }413 /**414 * Uklanja redak iz tablice415 *416 * @param integer $position redak koji je potrebno ukloniti417 */418 public function remove_row(int $position){419 $this -> remove_child($position);420 }421}422class HTMLRowElement extends HTMLElement {423 public function __construct($cellArray = null){424 parent :: __construct ("tr", true);425 if($cellArray !== null) {426 foreach ($cellArray as $cell) {427 #$this -> children -> add($cell);428 self::add_child($cell);429 }430 }else{431 self::add_child(new HTMLCellElement()); #dodaje prazan cell432 }433 }434 /**435 * Dodaje retku novu celiju. Ako je predani parametar jednak 'null',436 * tada se dodaje prazna celija.437 *438 * @param HTMLCellElement $cell nova celija koja se umece u redak439 * @return integer pozicija umetnute celije440 */441 public function add_cell(HTMLCellElement $cell): int442 {443 if($cell === null) $cell = new HTMLCellElement("");444 return $this -> add_child($cell);445 }446 /**447 * Dodaje retku vise novih celija. Ako je predani parametar prazno polje,448 * tada se dodaje samo jedna prazna celija.449 *450 * @param HTMLRowElement $cells nove celije451 */452 public function add_cells($cells = []){453 if(empty($cells)){454 $this -> add_cell(new HTMLCellElement(""));455 }else{456 foreach ($cells as $cell) {457 $this -> add_cell($cell);458 }459 }460 }461 /**462 * Uklanja celiju iz retka463 *464 * @param integer $position celija koju je potrebno ukloniti465 */466 public function remove_cell(int $position){467 $this -> children -> delete($position);468 }469}470class HTMLCellElement extends HTMLElement {471 public function __construct($elem = null){472 parent :: __construct ("td", true);473 if($elem !== null) self::add_child($elem);474 }475}476class HTMLFormElement extends HTMLElement{477 #[Pure] public function __construct() {478 parent :: __construct ("form", true);479 }480}481class HTMLInputElement extends HTMLElement {482 #[Pure] public function __construct () {483 parent :: __construct ("input", false);484 }485}486class HTMLButtonElement extends HTMLElement{487 #[Pure] public function __construct(){488 parent :: __construct("button", true);489 }490}491class HTMLSelectElement extends HTMLElement{492 #[Pure] public function __construct(){493 parent :: __construct("button", true);494 }495}496class HTMLOptionElement extends HTMLElement{497 #[Pure] public function __construct(){498 parent :: __construct("button", false);499 }500}501class HTMLDivElement extends HTMLElement{502 #[Pure] public function __construct(){503 parent :: __construct("div", true);504 }505}506class HTMLPElement extends HTMLElement{507 #[Pure] public function __construct(){508 parent :: __construct("p", true);509 }510}511class HTMLTitleElement extends HTMLElement{512 public function __construct($title){513 parent :: __construct("title", true);514 self::add_child(new HTMLTextNode($title));515 }516}517class HTMLMetaElement extends HTMLElement{518 public function __construct($charset){519 parent :: __construct("meta", false);520 self::add_attribute(new HTMLAttribute("charset", $charset));521 }522}523class HTMLAElement extends HTMLElement{524 public function __construct($link , $text){525 parent :: __construct("a", true);526 array_push($this -> attributes, new HTMLAttribute("href", $link));527 self::add_child(new HTMLTextNode($text));528 }529}530class HTMLLabelElement extends HTMLElement{531 #[Pure] public function __construct(){532 parent :: __construct("label", true);533 }534}...

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1require_once('html.php');2$html = new html();3$html->title('Test');4$html->body('Test');5require_once('html.php');6$html = new html();7$html->title('Test');8$html->body('Test');9require_once('html.php');10$html = new html();11$html->title('Test');12$html->body('Test');13require_once('html.php');14$html = new html();15$html->title('Test');16$html->body('Test');17require_once('html.php');18$html = new html();19$html->title('Test');20$html->body('Test');21require('1.php');22require('2.php');23require('3.php');24require('4.php');

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1require_once('html.php');2$object = new html();3$object->title = "My Title";4$object->body = "My Body";5$object->display();6require_once('html.php');7$object = new html("My Title", "My Body");8$object->display();9require_once('html.php');10$object = new html();11$object->display("My Title", "My Body");12require_once('html.php');13$object = new html();14$object->title = "My Title";15$object->body = "My Body";16$object->display();17require_once('html.php');18$object = new html("My Title", "My Body");19$object->display();20require_once('html.php');21$object = new html();22$object->display("My Title", "My Body");23require_once('html.php');24$object = new html();25$object->title = "My Title";26$object->body = "My Body";27$object->display();28require_once('html.php');29$object = new html("My Title", "My Body");30$object->display();31require_once('html.php');32$object = new html();33$object->display("My Title", "My Body");34require_once('html.php');35$object = new html();36$object->title = "My Title";37$object->body = "My Body";38$object->display();39require_once('html.php');40$object = new html("My Title", "My Body");41$object->display();

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1include "html.php";2$obj = new html();3$obj->h1("Hello World");4$obj->h2("Hello World");5$obj->p("Hello World");6$obj->br();7$obj->hr();

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1$myhtml = new html();2$myhtml->title('My Page');3$myhtml->body('Hello World');4$myhtml->display();5{6public $title;7public $body;8public function __construct()9{10$this->title = '';11$this->body = '';12}13public function title($title)14{15$this->title = $title;16}17public function body($body)18{19$this->body = $body;20}21public function display()22{23echo $this->title;24echo $this->body;25}26}27PHP __destruct() Method28public function __destruct() {29}30$myhtml = new html();31$myhtml->title('My Page');32$myhtml->body('Hello World');33$myhtml->display();34{35public $title;36public $body;37public function __construct()38{39$this->title = '';40$this->body = '';41}42public function title($title)43{44$this->title = $title;45}46public function body($body)47{48$this->body = $body;49}50public function display()51{52echo $this->title;53echo $this->body;54}55public function __destruct()56{57echo 'Goodbye';58}59}60PHP __call() Method61public function __call($name, $arguments) {62}63$myhtml = new html();64$myhtml->title('My Page');65$myhtml->body('Hello World');66$myhtml->display();67$myhtml->footer('footer');68{69public $title;70public $body;71public function __construct()72{73$this->title = '';74$this->body = '';75}

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1include_once("html.php");2$obj = new html();3$obj->htmlcode("test");4{5}6class Car {7 public $name;8 public $color;9 function set_name($name) {10 $this->name = $name;11 }12 function get_name() {13 return $this->name;14 }15}16class SportsCar extends Car {17 function hello() {18 return "beep";19 }20}21$sportscar1 = new SportsCar();22$sportscar1->set_name('Mercedes');23echo $sportscar1->get_name();24In the above example, we have created a parent class called Car which has a property named $name and a method named set_name(). We have also created a child class called SportsCar which extends the Car class. The child class has a method named hello() which returns

Full Screen

Full Screen

__construct

Using AI Code Generation

copy

Full Screen

1require_once("html.class.php");2$myhtml = new html;3echo $myhtml->start_form("add_user.php","post");4echo $myhtml->start_table("align=center");5echo $myhtml->start_row();6echo $myhtml->add_column("First Name:");7echo $myhtml->add_column($myhtml->add_input("text","first_name"));8echo $myhtml->end_row();9echo $myhtml->start_row();10echo $myhtml->add_column("Last Name:");11echo $myhtml->add_column($myhtml->add_input("text","last_name"));12echo $myhtml->end_row();13echo $myhtml->start_row();14echo $myhtml->add_column("Username:");15echo $myhtml->add_column($myhtml->add_input("text","username"));16echo $myhtml->end_row();17echo $myhtml->start_row();18echo $myhtml->add_column("Password:");19echo $myhtml->add_column($myhtml->add_input("password","password"));20echo $myhtml->end_row();21echo $myhtml->start_row();22echo $myhtml->add_column("Email Address:");23echo $myhtml->add_column($myhtml->add_input("text","email"));24echo $myhtml->end_row();25echo $myhtml->start_row();26echo $myhtml->add_column("Phone Number:");27echo $myhtml->add_column($myhtml->add_input("text","phone"));28echo $myhtml->end_row();29echo $myhtml->start_row();30echo $myhtml->add_column("Address:");31echo $myhtml->add_column($myhtml->add_input("text","address"));32echo $myhtml->end_row();33echo $myhtml->start_row();34echo $myhtml->add_column("City:");35echo $myhtml->add_column($myhtml->add_input("text","city"));36echo $myhtml->end_row();37echo $myhtml->start_row();38echo $myhtml->add_column("State:");39echo $myhtml->add_column($myhtml->add_input("text","state"));40echo $myhtml->end_row();

Full Screen

Full Screen

Automation Testing Tutorials

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.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful