Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

how to continue my selenium tests without closing the firefox after each test

View previous topic View next topic Go down

how to continue my selenium tests without closing the firefox after each test

Post by Hana on Thu May 07, 2015 2:32 pm

hi,
i have 2 tests in my script. i want to continue the second test, without closing my browser. how can i do that. Pls help
Code:
@Before
public void setUp() throws Exception {
    driver = new FirefoxDriver();
   baseurl=url;
    driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
    driver.get(baseUrl + "myportal/control/main");
    driver.findElement(By.xpath("//input[@name='USERNAME']")).clear();
    driver.findElement(By.xpath("//input[@name='USERNAME']")).sendKeys("admin");
    driver.findElement(By.xpath("//input[@name='PASSWORD']")).clear();
    driver.findElement(By.xpath("//input[@name='PASSWORD']")).sendKeys("admin");
    driver.findElement(By.xpath("//input[@type='image']")).click();
}

@Test
public void testCreateTeam() throws Exception {
    driver.get(baseUrl + "myportal/control/main");
    driver.findElement(By.xpath("//li[5]/a/b")).click();
    ...
}
@Test
public void testUpdateTeam() throws Exception {
  
    driver.findElement(By.xpath("//li[6]/a/b")).click();
    ...
}
@After
public void tearDown() throws Exception {
    driver.quit();
    String verificationErrorString = verificationErrors.toString();
    if (!"".equals(verificationErrorString)) {
        fail(verificationErrorString);
    }
}


Last edited by Hana on Thu May 07, 2015 2:42 pm; edited 1 time in total (Reason for editing : Explaining the issue)

Hana

Posts : 1
Join date : 2015-05-06

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum