Skip to content

NamedSelector::translateToXPath error on 'content' selector #384

Description

@mloureiro

Hi there!

I'm new in Behat so it might be something I'm doing wrong.
So doing:

$selector = new \Behat\Mink\Selector\NamedSelector();
$xpath = $selector->translateToXPath( array( 'content', "a string here" ) );

will lead to:

 Unknown named selector provided: "./descendant-or-self::*[contains(normalize-space(.), omgomgogm)]". Expected one of (fieldset, field, link, button, link_or_button, content, select, checkbox, radio, file, optgroup, option, table)

Also doing:

$page->find( 'named', array( 'content', "a string here" ) );

will lead to:

      error:_sahi.setServerVarPlain('___lastValue___52499ba54203f', (function(){
          var count = 0;
          while (_byXPath("(//html/./descendant-or-self::*[contains(normalize-space(.), a string here)])["+(count+1)+"]")) count++;
          return count;
      })())
      SyntaxError: The expression is not a legal expression.
      No trace available
      <a href='/_s_/dyn/Log_getBrowserScript?href=null&n=1601'><b>Click for browser script</b></a>

Thanks

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions