WebAssert::titleEquals() fails with Selenium2Driver

Created on 14 January 2019, almost 6 years ago
Updated 17 February 2023, almost 2 years ago

Problem/Motivation

$this->assertSession()->titleEquals() is not working in a FunctionalJavascript test.

The problem seems to be that $title_element->getText() returns an empty string, getHtml() however seems to be working.

Also, the error message is not helpful at all, as it doesn't show what it is actually comparing, you have to debug it to find that out:

Behat\Mink\Exception\ExpectationException: Title found

Proposed resolution

Not sure, might be a bug in Selection2Driver? We could work around it with driver specific code I guess..

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

10.1

Component
PHPUnit 

Last updated about 20 hours ago

Created by

🇨🇭Switzerland berdir Switzerland

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇺🇸United States sker101 NYC

    Getting the same error after switching from chrome-mink-driver to Selenium2Driver

    I created a PR here in minkphp/MinkSelenium2Driver to use "innerText" to retrieve the page title.

Production build 0.71.5 2024