Skip to content

Conversation

chx
Copy link

@chx chx commented Mar 19, 2018

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant