org.rdcit.ocSync.Selinium.FonctionalTest.java Source code

Java tutorial

Introduction

Here is the source code for org.rdcit.ocSync.Selinium.FonctionalTest.java

Source

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package org.rdcit.ocSync.Selinium;

import java.util.concurrent.TimeUnit;
import org.junit.After;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Ignore;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

/**
 *
 * @author sa841
 */
public class FonctionalTest {

    protected static WebDriver webDriver;

    @Ignore
    @BeforeClass
    public static void setUp() {
        System.setProperty("webdriver.chrome.driver",
                "C:\\Users\\sa841\\Documents\\chromedriver_win32\\chromedriver.exe");
        webDriver = new ChromeDriver();
        webDriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
    }

    @After
    public void cleanUp() {
        webDriver.manage().deleteAllCookies();
    }

    @AfterClass
    public static void tearDown() {
        webDriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
        webDriver.close();
    }
}