title: How can i click a span in Behat?
body: <p>I am using Behat to test an third-party webshop. I have a item in the shoppingcart that i want to delete. A confirmation pop-up shows that asks me if i really want to do it. The structure of this dialog looks as following:</p>
  
  <pre><code>&lt;div&gt;
      &lt;strong class="title"&gt;Remove item from shoppingcart&lt;/strong&gt;
  
      &lt;p&gt;Are you sure you want to delete this product?&lt;/p&gt;
  
      &lt;div class="button-container"&gt;
          &lt;span class="button" data-confirm="true"&gt;Yes&lt;/span&gt;
          &lt;span class="button alt right" data-mfp-close-link="true"&gt;No&lt;/span&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I was able to select the span using xpath with the following code:</p>
  
  <pre><code>public function iConfirmTheWindow()
  {
    $session = $this-&gt;getSession();
    $element = $session-&gt;getPage()-&gt;find(
    'xpath',
    $session-&gt;getSelectorsHandler()-&gt;selectorToXpath('css', 'span.button')
    );
    if (null === $element) {
    throw new \InvalidArgumentException(sprintf('Could not find confirmation window'));
    }
  
    $element-&gt;click();
  }
  </code></pre>
  
  <p>The selecting works, but Behat seems to be unable to click the span. </p>
  
  <pre><code> supports clicking on links and submit or reset buttons only. But "span" provided
  </code></pre>
  
  <p>I need to click this item, how can i rewrite my function so that it can be clicked?</p>