1
|
// $Id$
|
2
|
/**
|
3
|
* Copyright (C) 2009 EDIT
|
4
|
* European Distributed Institute of Taxonomy
|
5
|
* http://www.e-taxonomy.eu
|
6
|
*
|
7
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
8
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
9
|
*/
|
10
|
package eu.etaxonomy.dataportal.junit;
|
11
|
|
12
|
import org.junit.After;
|
13
|
import org.junit.AfterClass;
|
14
|
import org.junit.Before;
|
15
|
import org.junit.BeforeClass;
|
16
|
import org.openqa.selenium.WebDriverBackedSelenium;
|
17
|
|
18
|
import com.thoughtworks.selenium.Selenium;
|
19
|
|
20
|
import eu.etaxonomy.dataportal.DataPortalContext;
|
21
|
import eu.etaxonomy.dataportal.DataPortalManager;
|
22
|
|
23
|
/**
|
24
|
* http://seleniumhq.org/docs/03_webdriver.html#emulating-selenium-rc
|
25
|
*
|
26
|
* @author a.kohlbecker
|
27
|
* @deprecated SeleniumRCTests should only be used if you are really desperatly
|
28
|
* shor in time and you need to use the Selenium 1 IDE in order to
|
29
|
* quickly create tests.
|
30
|
*/
|
31
|
@Deprecated
|
32
|
public abstract class CdmDataPortalSeleniumRCTestBase extends CdmDataPortalTestBase {
|
33
|
|
34
|
protected static Selenium selenium;
|
35
|
|
36
|
@Before
|
37
|
public void setUpSelenium() {
|
38
|
if(selenium == null) {
|
39
|
selenium = new WebDriverBackedSelenium(driver, getContext().getBaseUri().toString());
|
40
|
}
|
41
|
}
|
42
|
|
43
|
@AfterClass
|
44
|
public static void stopSelenium() {
|
45
|
if (selenium != null) {
|
46
|
selenium.stop();
|
47
|
selenium = null;
|
48
|
}
|
49
|
}
|
50
|
|
51
|
}
|