[
https://issues.jboss.org/browse/ARQGRA-290?page=com.atlassian.jira.plugin...
]
Juraj Húska commented on ARQGRA-290:
------------------------------------
I developed some tests which indicates that it is an issue of {{WebDriver}} only.
Consider this JS:
{code}
function removeAttr() {
var disabledButtonAttributePresentNoValue =
document.getElementById('disabledButtonAttributePresentNoValue');
var disableButtonAttributePresentWithValue =
document.getElementById('disableButtonAttributePresentWithValue');
var buttonWithStyleEmptyValue =
document.getElementById('buttonWithStyleEmptyValue');
var buttonWithStyleNoValue = document.getElementById('buttonWithStyleNoValue');
var buttonWithNoStyleDefined =
document.getElementById('buttonWithNoStyleDefined');
console.log(disabledButtonAttributePresentNoValue.getAttribute('disabled'));
console.log(disableButtonAttributePresentWithValue.getAttribute('disabled'));
console.log(buttonWithStyleEmptyValue.getAttribute('style'));
console.log(buttonWithStyleNoValue.getAttribute('style'));
console.log(buttonWithNoStyleDefined.getAttribute('style'));
}
{code}
for this HTML code:
{code:xml}
<button disabled
id="disabledButtonAttributePresentNoValue">disabledButtonAttributePresentWithNoValue</button>
<button disabled="disabled"
id="disableButtonAttributePresentWithValue">disableButtonAttributePresentWithValue</button>
<button style=""
id="buttonWithStyleEmptyValue">buttonWithStyleEmptyValue</button>
<button style
id="buttonWithStyleNoValue">buttonWithStyleNoValue</button>
<button id="buttonWithNoStyleDefined"></button>
{code}
*the output for console is an empty line for each element with attribute defined but with
no value set. The output for retrieving of non defined attribute is {{null}}*
However, the {{Chrome WebDriver}} returns for non defined attribute ({{style}}, {{name}},
have not found more so far) empty string and {{HTML Unit}} returns correctly null.
testAttributeIsPresent fails on Chrome and PhantomJS
----------------------------------------------------
Key: ARQGRA-290
URL:
https://issues.jboss.org/browse/ARQGRA-290
Project: Arquillian Graphene
Issue Type: Bug
Reporter: Lukáš Fryč
Assignee: Juraj Húska
Priority: Critical
Fix For: 2.0.0.Alpha4
Test cases:
{code}
LocatorAttributeTest.testAttributeIsPresent
LocatorAttributeTest.testAttributeIsPresentDirectly
WebElementAttributeTest.testAttributeIsPresent
WebElementAttributeTest.testAttributeIsPresentDirectly
ConditionsTestCase.testAttributeIsPresent
{code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira