[JBoss JIRA] (ARQGRA-264) Create possibility to "inject" elements from frames
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-264?page=com.atlassian.jira.plugin... ]
Juraj Húska commented on ARQGRA-264:
------------------------------------
You are right Lukas on both questions.
You can specify {{@InFrame}} on both Page Fragments or Page Objects injection points declarations.
> Create possibility to "inject" elements from frames
> ---------------------------------------------------
>
> Key: ARQGRA-264
> URL: https://issues.jboss.org/browse/ARQGRA-264
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Affects Versions: 2.0.0.Alpha3
> Reporter: Aliaksei Lahachou
> Assignee: Juraj Húska
> Fix For: 2.0.0.Alpha5
>
> Original Estimate: 6 hours
> Remaining Estimate: 6 hours
>
> I don't like how WebDriver works with frames. I have to constantly switch between frames, I cannot simply "inject" element from a specific frame. I would love to have something like the following:
> {code:java}
> @FindBy(id = "menuBar")
> @InFrame(id = "header")
> private MenuBarFragment menuBar;
> {code}
> In this case Graphene should switch to frame "header" before any operation on menuBar and switch back to previous frame after (today, I have to do it manually). It seems to me that it is not too complex to do it with Arquillian/Graphene - you only need one more interceptor.
> Elements not annotated with @InFrame should work on current frame just as today.
--
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
11 years, 6 months
[JBoss JIRA] (ARQGRA-264) Create possibility to "inject" elements from frames
by Aliaksei Lahachou (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-264?page=com.atlassian.jira.plugin... ]
Aliaksei Lahachou commented on ARQGRA-264:
------------------------------------------
You are right about second question, {{@InFrame}} should be specified on injection point. Was just a wild thought of mine.
However, I still feel uneasy about switching to default frame. I see 2 potential problems:
* {{InFrameInterceptor}} always switches to default frame, the existing tests which switch to frames and make assumptions about the current frame may not work as expected. I'm not sure how Arquillian interceptors work, if they are called only when the annotation is present, it should not be a problem. If the interceptor is always there, it should switch back to default frame only if it switched frame on the way in.
* If there is an existing code which switches to frames, there is no possibility to switch to default frame using {{@InFrame}} annotation.
It seems to be a limitation of WebDriver, that we cannot get the current frame. If it's true, I think it should be clearly documented that specifying {{@InFrame}} will switch browser to default frame.
> Create possibility to "inject" elements from frames
> ---------------------------------------------------
>
> Key: ARQGRA-264
> URL: https://issues.jboss.org/browse/ARQGRA-264
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Affects Versions: 2.0.0.Alpha3
> Reporter: Aliaksei Lahachou
> Assignee: Juraj Húska
> Fix For: 2.0.0.Alpha5
>
> Original Estimate: 6 hours
> Remaining Estimate: 6 hours
>
> I don't like how WebDriver works with frames. I have to constantly switch between frames, I cannot simply "inject" element from a specific frame. I would love to have something like the following:
> {code:java}
> @FindBy(id = "menuBar")
> @InFrame(id = "header")
> private MenuBarFragment menuBar;
> {code}
> In this case Graphene should switch to frame "header" before any operation on menuBar and switch back to previous frame after (today, I have to do it manually). It seems to me that it is not too complex to do it with Arquillian/Graphene - you only need one more interceptor.
> Elements not annotated with @InFrame should work on current frame just as today.
--
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
11 years, 6 months
[JBoss JIRA] (ARQGRA-264) Create possibility to "inject" elements from frames
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-264?page=com.atlassian.jira.plugin... ]
Lukáš Fryč commented on ARQGRA-264:
-----------------------------------
Hey Aliaksei,
I assume the elements without @InFrame annotation will be looked in default content / frame.
For second case, @InFrame can be used on an injection point rather than class now (see {{MenuBarFragment}} sample above). I guess it's not sufficient to express that every fragment of certain type can be found in given frame with an exception of a root element (which is in default frame).
> Create possibility to "inject" elements from frames
> ---------------------------------------------------
>
> Key: ARQGRA-264
> URL: https://issues.jboss.org/browse/ARQGRA-264
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Affects Versions: 2.0.0.Alpha3
> Reporter: Aliaksei Lahachou
> Assignee: Juraj Húska
> Fix For: 2.0.0.Alpha5
>
> Original Estimate: 6 hours
> Remaining Estimate: 6 hours
>
> I don't like how WebDriver works with frames. I have to constantly switch between frames, I cannot simply "inject" element from a specific frame. I would love to have something like the following:
> {code:java}
> @FindBy(id = "menuBar")
> @InFrame(id = "header")
> private MenuBarFragment menuBar;
> {code}
> In this case Graphene should switch to frame "header" before any operation on menuBar and switch back to previous frame after (today, I have to do it manually). It seems to me that it is not too complex to do it with Arquillian/Graphene - you only need one more interceptor.
> Elements not annotated with @InFrame should work on current frame just as today.
--
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
11 years, 6 months
[JBoss JIRA] (ARQGRA-264) Create possibility to "inject" elements from frames
by Aliaksei Lahachou (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-264?page=com.atlassian.jira.plugin... ]
Aliaksei Lahachou commented on ARQGRA-264:
------------------------------------------
I looked through the pull request and I have 2 questions:
* Is it possible to switch to default frame? It seems that either {{index}} or {{nameOrId}} should be specified. Is it needed at all, or elements without {{@InFrame}} are always looked up in default frame?
* What about adding possibility to specify {{@InFrame}} on class for the whole fragments which live in a frame?
> Create possibility to "inject" elements from frames
> ---------------------------------------------------
>
> Key: ARQGRA-264
> URL: https://issues.jboss.org/browse/ARQGRA-264
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Affects Versions: 2.0.0.Alpha3
> Reporter: Aliaksei Lahachou
> Assignee: Juraj Húska
> Fix For: 2.0.0.Alpha5
>
> Original Estimate: 6 hours
> Remaining Estimate: 6 hours
>
> I don't like how WebDriver works with frames. I have to constantly switch between frames, I cannot simply "inject" element from a specific frame. I would love to have something like the following:
> {code:java}
> @FindBy(id = "menuBar")
> @InFrame(id = "header")
> private MenuBarFragment menuBar;
> {code}
> In this case Graphene should switch to frame "header" before any operation on menuBar and switch back to previous frame after (today, I have to do it manually). It seems to me that it is not too complex to do it with Arquillian/Graphene - you only need one more interceptor.
> Elements not annotated with @InFrame should work on current frame just as today.
--
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
11 years, 6 months
[JBoss JIRA] (ARQGRA-264) Create possibility to "inject" elements from frames
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-264?page=com.atlassian.jira.plugin... ]
Juraj Húska commented on ARQGRA-264:
------------------------------------
I sent and linked a pull request which ready for review.
> Create possibility to "inject" elements from frames
> ---------------------------------------------------
>
> Key: ARQGRA-264
> URL: https://issues.jboss.org/browse/ARQGRA-264
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Affects Versions: 2.0.0.Alpha3
> Reporter: Aliaksei Lahachou
> Assignee: Juraj Húska
> Fix For: 2.0.0.Alpha5
>
> Original Estimate: 6 hours
> Remaining Estimate: 6 hours
>
> I don't like how WebDriver works with frames. I have to constantly switch between frames, I cannot simply "inject" element from a specific frame. I would love to have something like the following:
> {code:java}
> @FindBy(id = "menuBar")
> @InFrame(id = "header")
> private MenuBarFragment menuBar;
> {code}
> In this case Graphene should switch to frame "header" before any operation on menuBar and switch back to previous frame after (today, I have to do it manually). It seems to me that it is not too complex to do it with Arquillian/Graphene - you only need one more interceptor.
> Elements not annotated with @InFrame should work on current frame just as today.
--
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
11 years, 6 months
[JBoss JIRA] (ARQGRA-264) Create possibility to "inject" elements from frames
by Juraj Húska (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-264?page=com.atlassian.jira.plugin... ]
Juraj Húska updated ARQGRA-264:
-------------------------------
Status: Pull Request Sent (was: Coding In Progress)
Git Pull Request: https://github.com/arquillian/arquillian-graphene/pull/81
> Create possibility to "inject" elements from frames
> ---------------------------------------------------
>
> Key: ARQGRA-264
> URL: https://issues.jboss.org/browse/ARQGRA-264
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Affects Versions: 2.0.0.Alpha3
> Reporter: Aliaksei Lahachou
> Assignee: Juraj Húska
> Fix For: 2.0.0.Alpha5
>
> Original Estimate: 6 hours
> Remaining Estimate: 6 hours
>
> I don't like how WebDriver works with frames. I have to constantly switch between frames, I cannot simply "inject" element from a specific frame. I would love to have something like the following:
> {code:java}
> @FindBy(id = "menuBar")
> @InFrame(id = "header")
> private MenuBarFragment menuBar;
> {code}
> In this case Graphene should switch to frame "header" before any operation on menuBar and switch back to previous frame after (today, I have to do it manually). It seems to me that it is not too complex to do it with Arquillian/Graphene - you only need one more interceptor.
> Elements not annotated with @InFrame should work on current frame just as today.
--
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
11 years, 6 months