Closed mach6 closed 9 years ago
If you run the following code, the @WebTest annotation parameters are ignored;
@WebTest
@WebTest(browser = "chrome", browserHeight = 640, browserWidth = 480, additionalCapabilities = { "version:41" }) @Test(singleThreaded = true) public class SessionSharingTest { private static SessionId sessionId; private SessionId getSessionId() { return Grid.driver().getSessionId(); } @Test(priority = 1) public void testSessionSharing_part1() { Grid.open("http://www.selion.io"); sessionId = getSessionId(); SeLionReporter.log("selion (" + sessionId + ")", true, true); } @Test(priority = 2, dependsOnMethods = "testSessionSharing_part1") public void testSessionSharing_part2() throws IOException { Assert.assertEquals(getSessionId().toString(), sessionId.toString()); SeLionReporter.log("selion (" + sessionId + ")", true, true); assertTrue(Grid.driver().getTitle().contains("SeLion"), "should be on selion.io with this session"); } @Test(priority = 3, dependsOnMethods = "testSessionSharing_part2") public void testSessionSharing_part3() throws Exception { Assert.assertEquals(getSessionId().toString(), sessionId.toString()); Thread.sleep(5000); //delay added to observe browser in this method before it is closed. } }
Note: @MobileTest probably has the same bug.
@MobileTest
If you run the following code, the
@WebTest
annotation parameters are ignored;