original_string: public function clickElementByText($text, $selector, $textSelector = null, $baseElement = null)
      {
          $element = $this->getElementByText($text, $selector, $textSelector, $baseElement);
          if ($element && $element->isVisible()) {
              $element->click();
          } elseif ($element) {
              throw new \Exception("Can't click '$text' element: not visible");
          } else {
              throw new \Exception("Can't click '$text' element: not Found");
          }
      }
code: public function clickElementByText($text, $selector, $textSelector = null, $baseElement = null)
      {
          $element = $this->getElementByText($text, $selector, $textSelector, $baseElement);
          if ($element && $element->isVisible()) {
              $element->click();
          } elseif ($element) {
              throw new \Exception("Can't click '$text' element: not visible");
          } else {
              throw new \Exception("Can't click '$text' element: not Found");
          }
      }
code_tokens: public function clickElementByText ( $ text , $ selector , $ textSelector = null , $ baseElement = null ) { $ element = $ this -> getElementByText ( $ text , $ selector , $ textSelector , $ baseElement ) ; if ( $ element && $ element -> isVisible ( ) ) { $ element -> click ( ) ; } elseif ( $ element ) { throw new \ Exception ( "Can't click '$text' element: not visible" ) ; } else { throw new \ Exception ( "Can't click '$text' element: not Found" ) ; } }
docstring: Finds an HTML element by class and the text value and clicks it.
  
  @param string    $text           Text value of the element
  @param string    $selector       CSS selector of the element
  @param string    $textSelector   Extra CSS selector for text of the element
  @param string    $baseElement    Element in which the search is based
docstring_tokens: Finds an HTML element by class and the text value and clicks it .