[arquillian-issues] [JBoss JIRA] (ARQGRA-29) isVisible JS condition should not fail when element is not present

Lukáš Fryč (JIRA) jira-events at lists.jboss.org
Wed Mar 28 16:22:47 EDT 2012


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

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

{{CommandInterceptor}} may be used in both cases, JAvaScript waits and Selenium waits.
                
> isVisible JS condition should not fail when element is not present
> ------------------------------------------------------------------
>
>                 Key: ARQGRA-29
>                 URL: https://issues.jboss.org/browse/ARQGRA-29
>             Project: Arquillian Graphene
>          Issue Type: Enhancement
>          Components: api, core
>    Affects Versions: 1.0.0.CR3
>            Reporter: Juraj Huska
>            Priority: Minor
>              Labels: waiting_on_user
>
> The method isVisible of object selenium is failing (throwing exception element not found), when the element is not present on the page.
> This behavior is quite unhandy in for invocations such as:
> {code}
> waitModel.failWith("Popup did not show").until(elementVisible.locator(popup));
> {code}
> It is only the example, but this will fail and no wait is done at all. To simulate it without failing, one has to write:
> {code}
> waitModel.failWith("Popup did not show").until(elementPresent.locator( jq( popup.getRawLocator + ":visible" ) ));
> {code}
> So he *has to use elementPresent condition and add :visible locator*, even when he really just wants to verify whether the element is visible, since it is obvious that the element can be present and not be visible at the same time.
> So my propose will be to *catch* the ElementNotFoundException in selenium invocation of isVisible and to *return false*, when the element is not present. For me this sounds quite reasonably. *Is there any problem with it? Will it be problem to change the Selenium API, and to make it not consistent with standard Selenium 1,2 ?*

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       



More information about the arquillian-issues mailing list