Behat / MinkExtension

Mink extension (tight integration and configuration) for Behat
MIT License
636 stars 279 forks source link

Added new function for waiting for an element to appear on page. #344

Open Rubinum opened 5 years ago

Rubinum commented 5 years ago

Hello,

I frequently work with Behat + Mink and I have a feature here, that I like very much in my projects. To give some love back to this awesome library, I want to contribute a new feature. This could maybe be part of the MinkContext.

In modern web applications, some magic can happen by executing javascript on your website. When you write behat tests, I often stumpled over the fact, that some elements may not be present, when I want to use them in my behat tests. (e.g. Make sure that there are present) Sometimes javascript function can be difficult to execute in the browser and can take some time, sometimes the mashine, which is executing the tests, is not powerfull enough to get things to work in time.

For that reason I want to contribute the phrase:

Then I wait for element ".someClass" to appear