minkphp / docs

Mink documentation
https://mink.behat.org
83 stars 44 forks source link

Mention Chromedriver is async #81

Open chx opened 6 years ago

chx commented 6 years ago

I have written my first test this last week using Mink and Chromedriver and it really is not clear Chromedriver is async (it wasn't always so although it's been more 4.5 years since they switched). If this pull request is accepted, I will add notes to some method doxygen as well and perhaps provide sample code. Drupal 8.5.0 has

public function waitForElement($selector, $locator, $timeout = 10000) {
  $page = $this->session->getPage();

  $result = $page->waitFor($timeout / 1000, function () use ($page, $selector, $locator) {
    return $page->find($selector, $locator);
  });

  return $result;
}

which is really helpful, what would be a good place to put this in the Mink documentation -- or perhaps the codebase?