selenium weDriver sample on java

package seleniumSmpl;

import static org.hamcrest.CoreMatchers.is;
import static org.junit.Assert.*;

import org.junit.Test;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.Keys;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.edge.EdgeDriver;
import org.openqa.selenium.edge.EdgeOptions;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.ie.*;

import java.io.File;
import java.util.concurrent.TimeUnit;


public class TtestSelForEdge {
	
	private WebDriver webDriver;
	
    @Before
    public void createDriver() {
    	//webDriver for Edge
    	//ver 83.0.478.61
    	EdgeOptions op = new EdgeOptions();
    	// headless mode
    	//op.addArguments("--headless");
    	
    	File file = new File("/Users/tk/tera_batch/wk/seleniumSmpl/bin/msedgedriver");
    	System.setProperty("webdriver.edge.driver", file.getAbsolutePath());
        //headless mode
        //webDriver = new EdgeDriver(op);
    	webDriver = new EdgeDriver();
        
    }

    @After
    public void quitDriver() {
        webDriver.close();
    }

	@Test
	public void test() throws Exception {
		
		
	//sample page
        webDriver.get("http://localhost:9000/tutorial-thin-nouveaux/");

        webDriver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);
        
        System.out.println(webDriver.getCurrentUrl());
        System.out.println(webDriver.getTitle());
        
        //ログオン画面へのリンククリック
		WebElement wb = webDriver.findElement(By.linkText("ログオン画面へ"));
		JavascriptExecutor executor = (JavascriptExecutor)webDriver;
		executor.executeScript("arguments[0].click();", wb);
        
        
        webDriver.manage().timeouts().pageLoadTimeout(15, TimeUnit.SECONDS);
        System.out.println(webDriver.getCurrentUrl());
        System.out.println(webDriver.getTitle());
        
        //ユーザIDを入力して「ログオン」ボタンクリック
        webDriver.findElement(By.name("userId")).sendKeys("031");
        webDriver.findElement(By.xpath("//input[@type='submit' and @value='ログオン']"))
        	.sendKeys(Keys.ENTER);
        
        Thread.sleep(2000);
        System.out.println(webDriver.getCurrentUrl());
        System.out.println(webDriver.getTitle());
        //「登録」ボタンクリック
        //webDriver.findElement(By.name("forward_insert")).sendKeys(Keys.ENTER);
        //アコーディオンメニューのリンククリック
        WebElement wb_ext =webDriver.findElement(By.linkText("menu"));
        JavascriptExecutor executor2 = (JavascriptExecutor)webDriver;
		executor2.executeScript("arguments[0].click();", wb_ext);

        Thread.sleep(2000);
        System.out.println(webDriver.getCurrentUrl());
        System.out.println(webDriver.getTitle());
        
        //「登録」画面入力、「登録」ボタンクリック
        webDriver.findElement(By.name("id")).sendKeys("600");
        webDriver.findElement(By.name("name")).sendKeys("sucessuseri");
        webDriver.findElement(By.name("age")).sendKeys("10");
        webDriver.findElement(By.name("birth")).sendKeys("2010/06/20");
        webDriver.findElement(By.xpath("//input[@type='submit' and @value='登録']"))
    	.sendKeys(Keys.ENTER);
        Thread.sleep(5000);
        System.out.println(webDriver.getCurrentUrl());
        System.out.println(webDriver.getTitle());
        assertEquals("結果画面",webDriver.getTitle());


	}

}