module-webdriver icon indicating copy to clipboard operation
module-webdriver copied to clipboard

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

Open ThomasLandauer opened this issue 1 year ago • 0 comments

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

ThomasLandauer avatar Apr 16 '24 20:04 ThomasLandauer