code: public function attachLabelBySelector(SelectorInterface $selector, $label)
      {
          for ($i = 0, $count = count($this->widgets); $i < $count; $i++) {
              if ($selector->isMatch($this->widgets[$i])) {
                  if (method_exists($this->widgets[$i], 'setLabel')) {
                      $this->widgets[$i]->setLabel($label);
  
                      return;
                  }
              }
          }
      }
docs: Used by the page object to set widgets labels to external label tags.
  
  @param $selector   Criteria to apply.