Revision 89ba9443f1d80b2bea3a33477b1ac53585fbb16d authored by jimevans on 16 March 2018, 14:46:32 UTC, committed by Andreas Tolfsen on 16 March 2018, 14:46:32 UTC
When the context element is `document.documentElement`, and an attempt is made to find elements from that context element using an XPath of `..`, a snapshot is returned containing the `document` object. While this is apparently the correct behavior for XPath, the WebDriver spec says that if the object in the snapshot is not an element, we should return an error with error code "invalid selector." The test_parent_htmldocument test in both find_element_from_element.py and find_elements_from_element.py expect a success in this case. This commit changes the tests to correctly expect an error from the driver.
1 parent 1cbb928
button_haspopup_listbox-manual.html
<!doctype html>
<html>
<head>
<title>button haspopup listbox</title>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type"/>
<link rel="stylesheet" href="/resources/testharness.css">
<link rel="stylesheet" href="/wai-aria/scripts/manual.css">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/wai-aria/scripts/ATTAcomm.js"></script>
<script>
setup({explicit_timeout: true, explicit_done: true });
var theTest = new ATTAcomm(
{
"steps" : [
{
"element" : "test",
"test" : {
"ATK" : [
[
"property",
"role",
"is",
"ROLE_PUSH_BUTTON"
],
[
"property",
"objectAttributes",
"contains",
"haspopup:listbox"
],
[
"property",
"states",
"contains",
"STATE_HAS_POPUP"
]
],
"AXAPI" : [
[
"property",
"AXRole",
"is",
"AXPopUpButton"
],
[
"property",
"AXSubrole",
"is",
"<nil>"
],
[
"property",
"AXRoleDescription",
"is",
"pop up button"
],
[
"property",
"actions",
"contains",
"AXShowMenu"
]
],
"IAccessible2" : [
[
"property",
"role",
"is",
"ROLE_SYSTEM_PUSHBUTTON"
],
[
"property",
"objectAttributes",
"contains",
"haspopup:listbox"
]
],
"MSAA" : [
[
"property",
"role",
"is",
"ROLE_SYSTEM_PUSHBUTTON"
],
[
"property",
"states",
"contains",
"STATE_SYSTEM_HASPOPUP"
]
],
"UIA" : [
[
"property",
"IUIAutomationElement.ControlType",
"is",
"Button"
],
[
"property",
"controlPatterns",
"contains",
"ExpandCollapse"
]
]
},
"title" : "step 1",
"type" : "test"
}
],
"title" : "button haspopup listbox"
}
) ;
</script>
</head>
<body>
<p>This test examines the ARIA properties for button haspopup listbox.</p>
<div id="test" role="button" aria-haspopup="listbox">
OK
</div>
<ul role="listbox">
<li tabindex="0" role="option">sprouts</li>
<li tabindex="-1" role="option">cucumbers</li>
</ul>
<div id="manualMode"></div>
<div id="log"></div>
<div id="ATTAmessages"></div>
</body>
</html>
Computing file changes ...