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

Drone webdriver is not created during @BeforeClass

XMLWordPrintable

      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: