Codeception / module-webdriver

WebDriver module for Codeception
MIT License
36 stars 24 forks source link

Bug: `MalformedLocatorException` thrown for `id`s that don't start with a character (HTML 5) #128

Open ThomasLandauer opened 5 months ago

ThomasLandauer commented 5 months ago

These both result in an MalformedLocatorException:

$I->seeElement(['id' =>'123']);
$I->seeElement(['css' =>'div#123']);

The reason is probably that up to HTML 4, ids were required to start with a character (a-z). However, in HTML 5, ids can begin with virtually anything: https://html.spec.whatwg.org/multipage/dom.html#the-id-attribute