Uploaded image for project: 'Arquillian'
  1. Arquillian
  2. ARQ-1340

Drone webdriver is not created during @BeforeClass

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • drone_2.0.0.Beta1
    • drone_1.1.1.Final
    • Extension - Drone
    • None
    • 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

      Drone webdriver is not created during @BeforeClass, however is created during @Before or if called by GrapheneContext.getProxy()

      The following does NOT work:

       
      @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"));
      	}
      }
      

      However, if I use GrapheneContext.getProxy() instead of driver, everything works as expected:

       
      @BeforeClass
      	public static void setup(){
      		GrapheneContext.getProxy().navigate().to("http://google.com");
      	}
      

      ALSO, if @Before is used then Drone webdriver is created as expected, so this problem is specific to @BeforeClass

              mjobanek Matous Jobanek
              alex-o_jira Alex Okrushko (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: