[
https://issues.jboss.org/browse/ARQGRA-484?page=com.atlassian.jira.plugin...
]
Vsevolod Golovanov edited comment on ARQGRA-484 at 3/30/17 3:36 AM:
--------------------------------------------------------------------
<Moved to PR154>
was (Author: vsevolodgolovanov):
{code:title=PR154}if (obj instanceof GrapheneElementImpl) {
obj = ((GrapheneElementImpl) obj).element;
}
return element.equals(obj);
{code}
{{obj instanceof GrapheneElementImpl}} would most of the time evaluate to false because
obj would be a proxy. So the execution would move on to {{element.equals(obj)}}, where it
relies on Selenium's RemoteWebElement#equals to unwrap the obj (via the WrapsElement
interface and its getWrappedElement() method). Might as well rely on it in case of {{obj
instanceof GrapheneElementImpl}} evaluating to true. In fact, whenever there are proxies
involved, code like {{otherObj.privateField}} seems iffy. What if a proxy sometimes
extends the Impl class?
Enriched element is not equal to the same element
-------------------------------------------------
Key: ARQGRA-484
URL:
https://issues.jboss.org/browse/ARQGRA-484
Project: Arquillian Graphene
Issue Type: Bug
Affects Versions: 2.1.0.Alpha3
Reporter: Jiří Štefek
After upgrading to 2.1.0.Alpha3 from Alpha2, the following (simplified) test won't
pass:
{code}
@FindBy(id="id")
private WebElement e;
@Test
private void test(){
e.equals(e)
}
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)