-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
click()
doesn't find <summary>
, <label>
, or elements inside <a>
#18
Comments
Workaround: You need to identify the element by some attribute (not by its text content), e.g.: $I->click(['css' => 'details[id="foo"] summary']); |
click()
doesn't find <summary>
or elements inside <a>
click()
doesn't find <summary>
, <label>
, or elements inside <a>
Clicking on a I tried to fix it by adding this to WebDriver::_findClickable(): ".//label[normalize-space(.)=$locator]" ...but I'm getting this error in the console:
|
Also, it looks like elements inside |
Workaround for $open = $I->grabAttributeFrom(['css' => 'details.foo'], 'open');
// Assert that <details> is closed:
$I->assertNull($open);
// Assert that <details> is open:
$I->assertSame('true', $open); |
The HTML5 element
<summary>
is missing from the list of clickable elements atWebDriver::_findClickable()
I tried to add it there just like the others:
".//summary[normalize-space(.)=$locator]",
- but this doesn't really fix it, since there are many elements allowed inside<summary>
: https://html.spec.whatwg.org/#the-summary-elementI think this needs to be refactored, since (from looking at the code) elements inside
<a>
are also not matched, e.g.<a href="..."><div>...</div></a>
- which is valid HTML 5: https://html.spec.whatwg.org/#the-a-elementSo I guess the arguments that are thrown into
Locator::combine()
need to be replaced by functions to allow more complex matching logic.The text was updated successfully, but these errors were encountered: