[arquillian-issues] [JBoss JIRA] (ARQGRA-365) Invalid verification of element presence with css locator

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Tue Sep 10 09:28:03 EDT 2013


    [ https://issues.jboss.org/browse/ARQGRA-365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12803120#comment-12803120 ] 

Lukáš Fryč commented on ARQGRA-365:
-----------------------------------

After investigation, me and Michal found out that Xpath locator worked because it was referenced by root. The page which referenced element that wasn't found, was injected as Page Fragment: @FindBy(id = "root"). But the element wasn't under the DOM tree under "root". That's why XPath was able to find it and CSS wasn't.
                
> Invalid verification of element presence with css locator
> ---------------------------------------------------------
>
>                 Key: ARQGRA-365
>                 URL: https://issues.jboss.org/browse/ARQGRA-365
>             Project: Arquillian Graphene
>          Issue Type: Bug
>    Affects Versions: 2.0.0.Alpha5
>            Reporter: Michal Vanco
>            Assignee: Lukáš Fryč
>             Fix For: 2.0-Tracking
>
>
> I have a page fragment with some element mapped with @FindBy(css='...'), this element is available after some operation in fragment.
> When I call Graphene.waitGui().until().element(element).is().present(), it fails on NoSuchElementException.
> Note that this fails with css locator, but works fine with xpath locator.
> At first, element is trying to de-reference (with failure) and then call toString(), related code is at:
> https://github.com/arquillian/arquillian-graphene/blob/master/impl/src/main/java/org/jboss/arquillian/graphene/condition/element/ElementIsPresent.java#L53
> See the stacktrace at:
> https://gist.github.com/michalvanco/2fd53306a983ed386b02

--
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



More information about the arquillian-issues mailing list