[JBoss JIRA] (ARQ-1343) Schema creation scripts should be repeatable
by Bartosz Majsak (JIRA)
Bartosz Majsak created ARQ-1343:
-----------------------------------
Summary: Schema creation scripts should be repeatable
Key: ARQ-1343
URL: https://issues.jboss.org/browse/ARQ-1343
Project: Arquillian
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Extension - Persistence
Affects Versions: persistence_1.0.0.Alpha5
Environment: H2 DB on default integration tests profile
Reporter: Bartosz Majsak
Assignee: Bartosz Majsak
Fix For: persistence_1.0.0.next
Schema creation script should drop tables and sequences if exist in order to avoid "dirty state" from previous tests.
--
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, 10 months
[JBoss JIRA] (ARQGRA-273) Provide utilty method in Graphene class to find element
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQGRA-273?page=com.atlassian.jira.plugin... ]
Lukáš Fryč commented on ARQGRA-273:
-----------------------------------
I would rather intercept the fcall to findElement/-s and attach the protective interceptors to the created WebElement proxies.
> Provide utilty method in Graphene class to find element
> -------------------------------------------------------
>
> Key: ARQGRA-273
> URL: https://issues.jboss.org/browse/ARQGRA-273
> Project: Arquillian Graphene
> Issue Type: Feature Request
> Reporter: Jan Papousek
>
> Graphene injects web element instances to page objects and page fragments which can handle stale element exception. Sometimes one needs to find element manually via WebDriver#findElement(...). It would be nice to provide a method in Graphene API for finding elements returning instances protected to stale element exceptions.
--
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, 10 months
[JBoss JIRA] (ARQ-1340) Drone webdriver is not created during @BeforeClass
by Lukáš Fryč (JIRA)
[ https://issues.jboss.org/browse/ARQ-1340?page=com.atlassian.jira.plugin.s... ]
Lukáš Fryč commented on ARQ-1340:
---------------------------------
Honestly, accessing {{WebDriver}} instance in {{@BeforeClass}} appears to be anti-pattern:
* {{@BeforeClass}} is invoked just once before the class
* we expect to start from fresh for each {{@Test}}
* when one {{@Test}} fails, there is nothing which will re-open the page to let following {{@Test}} do the job
* which violates test isolation
I would rather use {{@Before}} which can be with {{@Drone}} just fine.
Could you please elaborate your use case more to help us understand why you require to use {{@BeforeClass}}?
It might be valid use case, but I don't see it know.
> Drone webdriver is not created during @BeforeClass
> --------------------------------------------------
>
> Key: ARQ-1340
> URL: https://issues.jboss.org/browse/ARQ-1340
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Drone
> Affects Versions: drone_1.1.1.Final
> Environment: Arquillian JUnit Container 1.0.3.Final
> Arquillian Graphene Webdriver 2.0.0.Alpha3
> Arquillian Drone dependencies and Selenium dependencies 1.1.1.Final
> Arquillian Core dependencies 1.0.3.Final
> junit 4.8.1
> jdk 1.6
> Reporter: Alex Okrushko
> Assignee: Karel Piwko
>
> Drone webdriver is not created during @BeforeClass, however *is created during @Before or if called by GrapheneContext.getProxy()*
> The following does NOT work:
> {code:java}
> @RunWith(Arquillian.class)
> public class TestDroneLogin {
> @Drone
> private static WebDriver driver;
>
> @BeforeClass
> public static void setup(){
> //GrapheneContext.getProxy().navigate().to("http://google.com");
> driver.navigate().to("http://google.com");
> }
>
> @Test
> public void testInput(){
> driver.findElement(By.cssSelector("input#gbqfq"));
> }
> }
> {code}
> However, if I use {{GrapheneContext.getProxy()}} instead of {{driver}}, everything works as expected:
> {code:java}
> @BeforeClass
> public static void setup(){
> GrapheneContext.getProxy().navigate().to("http://google.com");
> }
> {code}
> ALSO, if {{@Before}} is used then Drone webdriver is created as expected, so this problem is specific to {{@BeforeClass}}
--
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, 10 months
[JBoss JIRA] (ARQ-1340) Drone webdriver is not created during @BeforeClass
by Karel Piwko (JIRA)
[ https://issues.jboss.org/browse/ARQ-1340?page=com.atlassian.jira.plugin.s... ]
Karel Piwko commented on ARQ-1340:
----------------------------------
Hi Alex,
Drone currently has two lifecycles - TestScoped and MethodScoped. Both enrich the class during test method execution. This might moved and thus solve webdriver=null issue in @BeforeClass method. I think that GrapheneContext has a different lifecycle, so it is able to reach WebDriver instance via getProxy() call.
[~lfryc] might provide more insight about @Page objects, whether the same implementation change can be provided.
> Drone webdriver is not created during @BeforeClass
> --------------------------------------------------
>
> Key: ARQ-1340
> URL: https://issues.jboss.org/browse/ARQ-1340
> Project: Arquillian
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: Extension - Drone
> Affects Versions: drone_1.1.1.Final
> Environment: Arquillian JUnit Container 1.0.3.Final
> Arquillian Graphene Webdriver 2.0.0.Alpha3
> Arquillian Drone dependencies and Selenium dependencies 1.1.1.Final
> Arquillian Core dependencies 1.0.3.Final
> junit 4.8.1
> jdk 1.6
> Reporter: Alex Okrushko
> Assignee: Karel Piwko
>
> Drone webdriver is not created during @BeforeClass, however *is created during @Before or if called by GrapheneContext.getProxy()*
> The following does NOT work:
> {code:java}
> @RunWith(Arquillian.class)
> public class TestDroneLogin {
> @Drone
> private static WebDriver driver;
>
> @BeforeClass
> public static void setup(){
> //GrapheneContext.getProxy().navigate().to("http://google.com");
> driver.navigate().to("http://google.com");
> }
>
> @Test
> public void testInput(){
> driver.findElement(By.cssSelector("input#gbqfq"));
> }
> }
> {code}
> However, if I use {{GrapheneContext.getProxy()}} instead of {{driver}}, everything works as expected:
> {code:java}
> @BeforeClass
> public static void setup(){
> GrapheneContext.getProxy().navigate().to("http://google.com");
> }
> {code}
> ALSO, if {{@Before}} is used then Drone webdriver is created as expected, so this problem is specific to {{@BeforeClass}}
--
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, 10 months