Project

General

Profile

« Previous | Next » 

Revision f64f32be

Added by Andreas Müller almost 2 years ago

ref #10072 adapt dataportal to log4j2

View differences:

src/main/java/eu/etaxonomy/dataportal/selenium/WebDriverFactory.java
5 5

  
6 6
import java.io.IOException;
7 7

  
8
import org.apache.log4j.Logger;
8
import org.apache.logging.log4j.LogManager;
9
import org.apache.logging.log4j.Logger;
9 10
import org.openqa.selenium.WebDriver;
10 11
import org.openqa.selenium.chrome.ChromeDriver;
11 12
import org.openqa.selenium.chrome.ChromeOptions;
......
19 20

  
20 21
/**
21 22
 * @author andreas
22
 *
23 23
 */
24 24
public class WebDriverFactory {
25 25

  
26

  
27
    public static final Logger logger = Logger.getLogger(WebDriverFactory.class);
26
    private static final Logger logger = LogManager.getLogger();
28 27

  
29 28
    public static final String SYSTEM_PROPERTY_NAME_BROWSER = "browser";
30 29

  
......
73 72

  
74 73
        String chromeBinary = System.getProperty("webdriver.chrome.bin");
75 74
        if(chromeBinary != null) {
76
            CdmDataPortalTestBase.logger.info(("webdriver.chrome.bin = " + chromeBinary));
75
            logger.info(("webdriver.chrome.bin = " + chromeBinary));
77 76
            options.setBinary(chromeBinary);
78 77

  
79 78
        }
......
94 93

  
95 94
        WebDriver driver;
96 95

  
97
        CdmDataPortalTestBase.logger.info(("webdriver.firefox.bin = " + System.getProperty("webdriver.firefox.bin")));
98
        CdmDataPortalTestBase.logger.info(("webdriver.firefox.library.path = " + System.getProperty("webdriver.firefox.library.path")));
96
        logger.info(("webdriver.firefox.bin = " + System.getProperty("webdriver.firefox.bin")));
97
        logger.info(("webdriver.firefox.library.path = " + System.getProperty("webdriver.firefox.library.path")));
99 98

  
100 99
        FirefoxProfile firefoxProfile = new FirefoxProfile();
101 100

  
......
113 112
//                firefoxProfile.addExtension(CdmDataPortalTestBase.class, "/org/mozilla/addons/firepath-" + FIREXPATH_VERSION + "-fx.xpi");
114 113

  
115 114
            } catch (IOException e) {
116
                CdmDataPortalTestBase.logger.error(e);
115
                logger.error(e);
117 116
                System.exit(-1);
118 117
            }
119 118
        }
......
131 130

  
132 131
         initFirefoxDriver();
133 132
         try {
134
            Thread.currentThread().sleep(1000);
133
            Thread.currentThread();
134
            Thread.sleep(1000);
135 135
        } catch (InterruptedException e) {
136 136
            System.err.println("InterruptedException");
137 137
        }
138

  
139 138
    }
140

  
141

  
142

  
143

  
144
}
139
}

Also available in: Unified diff