Perform a click on a link or a button, given by a locator.

@param string $buttonLinkLocator the button title
@see \Codeception\Module\WebDriver::click()
12837
public function clickButtonInDialog(string $buttonLinkLocator)
    {
        $I = $this->tester;
        $this->canSeeDialog();
        $I->click($buttonLinkLocator, self::$openedModalButtonContainerSelector);
        $I->waitForElementNotVisible(self::$openedModalSelector);
    }
290975
def click_link(self, link_text, timeout=settings.SMALL_TIMEOUT):
        
        self.click_link_text(link_text, timeout=timeout)
1234124
public function setUrl(string $url = '#'): ButtonInterface
    {
        if ($this->isVisibility()) {
            //            if($this->url !== null) {
            //                if(strpos($this->url, '://') !== false) {
            //                    return $this;
            //                }
            //            }
            $this->url = $url;
        }

        return $this;
    }
489125
public function iClickOnTheElement($locator)
    {
        $session = $this->getSession(); // get the mink session
        $element = $session->getPage()->find('css', $locator); // runs the actual query and returns the element

        // errors must not pass silently
        PHPUnit_Framework_Assert::assertNotNull($element, sprintf('Could not evaluate CSS selector: "%s"', $locator));

        $this->getSession()->executeScript(
            "$('#" . $element->getAttribute('id') . "').click()"
        );

        // ok, let's click on it
        $element->click();
    }
559656
public function iClickTheTitleOnTheBlogPostList($title)
    {
        $node = $this->getSession()->getPage()->find('xpath', sprintf('//h2[contains(., "%s")]/a', $title));

        if (is_null($node)) {
            throw new ElementNotFoundException($this->getSession(), 'Blog post title');
        }

        $node->click();
    }
1110213
public function selectorToXpath($selector, $locator)
    {
        if ('xpath' === $selector) {
            if (!is_string($locator)) {
                throw new \InvalidArgumentException('The xpath selector expects to get a string as locator');
            }

            return $locator;
        }

        return $this->getSelector($selector)->translateToXPath($locator);
    }
1323893
def click(self, locator, params=None, timeout=None):
        
        self._click(locator, params, timeout)
65151
public function clickLink($link)
    {
        $link = $this->fixStepArgument($link);
        $this->getSession()->getPage()->clickLink($link);
    }
1180669
public static void click() {
		robot.mousePress(InputEvent.BUTTON1_MASK);
		robot.mouseRelease(InputEvent.BUTTON1_MASK);
		delay();
	}
735876
public function fillField($locator, $value)
    {
        $field = $this->findField($locator);

        if (null === $field) {
            throw new ElementNotFoundException($this->getDriver(), 'form field', 'id|name|label|value|placeholder', $locator);
        }

        $field->setValue($value);
    }
90846
function onLinkClick(event) {
    // Resolve anchor link
    var page = url.format( url.resolve(location, this.getAttribute('href')) );

    // Load new page
    piccolo.loadPage( page );
    event.preventDefault();
    return false;
  }
64968
public void click() {
    assertElementNotStale();
    assertElementDisplayed();

    parent.getScopeServices().captureOperaIdle();

    if (getTagName().equals("OPTION")) {
      callMethod("return " + OperaAtom.CLICK + "(locator)");
    } else {
      parent.getMouse().click(getCoordinates());
    }

    try {
      parent.waitForLoadToComplete();
    } catch (ResponseNotReceivedException e) {
      // This might be expected
      logger.fine("Response not received, returning control to user");
    }
  }
901936
public static ExpectedCondition<WebElement> elementToBeClickable(final By locator) {
    return new ExpectedCondition<WebElement>() {
      @Override
      public WebElement apply(WebDriver driver) {
        WebElement element = visibilityOfElementLocated(locator).apply(driver);
        try {
          if (element != null && element.isEnabled()) {
            return element;
          }
          return null;
        } catch (StaleElementReferenceException e) {
          return null;
        }
      }

      @Override
      public String toString() {
        return "element to be clickable: " + locator;
      }
    };
  }
7037
public void click(String locator) {
        getDispatcher().beforeClick(this, locator);
        
        click();
        validatePresenceOfAlert();
        WebDriverWaitUtils.waitUntilElementIsPresent(locator);
        
        getDispatcher().afterClick(this, locator);
    }
558912
public function clickLinkInHeader(string $link)
    {
        $header_link = $this->find('css', '.page-title-action');

        if ($header_link->getText() === $link) {
            $header_link->click();
        } else {
            $this->getHeaderElement()->clickLink($link);
        }
    }
431616
public function button($text, $href, $buttonAlign = 'right', $innerClass = null, $args = [])
    {
        if ('right' == $buttonAlign) {
            $innerClass .= ' pull-right';
        } elseif ('left' == $buttonAlign) {
            $innerClass .= ' pull-left';
        }
        $argsstr = '';
        foreach ($args as $k => $v) {
            $argsstr .= $k . '="' . $v . '" ';
        }

        return '<a href="' . $href . '" class="btn btn-default ' . $innerClass . '" ' . $argsstr . '>' . $text . '</a>';
    }
141572
public function staticMapLink($title, array $mapOptions = [], array $linkOptions = []) {
		return $this->Html->link($title, $this->staticMapUrl($mapOptions + ['escape' => false]), $linkOptions);
	}