[arquillian-issues] [JBoss JIRA] (ARQGRA-416) @InFrame duplicitly switches to iframe with fragment/page object method

Juraj Húska (JIRA) issues at jboss.org
Mon Jan 27 12:47:28 EST 2014


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

Juraj Húska edited comment on ARQGRA-416 at 1/27/14 12:46 PM:
--------------------------------------------------------------

It is the same for Page Object methods. 

The fix would be removing the further enrichment of the Page Object/Page Fragments, which is now IMO redundant.
Because, the PO/PF are enriched recursively by interceptor, [here|https://github.com/arquillian/arquillian-graphene/blob/master/impl/src/main/java/org/jboss/arquillian/graphene/enricher/InFrameInterceptor.java#L62-64] - so by demand, not in advance.
                
      was (Author: jhuska):
    It is the same for Page Object methods. 

The fix would be removing the further enrichment of the Page Object/Page Fragments, which is now IMO redundant.
Because, the PO/PF are enriched recursively by interceptor, [here|https://github.com/arquillian/arquillian-graphene/blob/master/impl/src/main/java/org/jboss/arquillian/graphene/enricher/InFrameInterceptor.java#L62-64].
                  
> @InFrame duplicitly switches to iframe with fragment/page object method
> -----------------------------------------------------------------------
>
>                 Key: ARQGRA-416
>                 URL: https://issues.jboss.org/browse/ARQGRA-416
>             Project: Arquillian Graphene
>          Issue Type: Bug
>    Affects Versions: 2.0.0.Final
>            Reporter: Jan Dosoudil
>            Assignee: Juraj Húska
>             Fix For: 2.0.1.Final
>
>
> {code}
> public class Fragment {
>     @FindBy(id="button")
>     private WebElement button;
>     public void clickButton() {
>         button.click();
>     }
>     public WebElement getButton() {
>         return button;
>     }
> }
> {code}
> {code}
> @RunWith(Arquillian.class)
> @RunAsClient
> public class Test {
>     //...
>     @FindBy(id="content")
>     @InFrame(nameOrId="frame")
>     private Fragment Fragment;
>     @Test
>     public void testWebElement() {
>         fragment.getButton().click(); //PASS
>     }
>     @Test
>     public void testMethod() {
>         fragment.clickButton(); //FAIL
>     }
> }
> {code}
> Exception is: org.openqa.selenium.NoSuchFrameException: Unable to locate frame: frame

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