package com.tridentqa.webdriver.pages;

import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.sahagin.runlib.external.adapter.webdriver.WebDriverAdapter;

public class ContactPageSampleTest {
    private WebDriver wd;
    
    @Before
    public void setUp() {
        wd = new FirefoxDriver();
        WebDriverAdapter.setAdapter(wd);
    }
    
    @After
    public void tearDown() {
        if (wd != null) {
            wd.quit();
        }
    }
    
    @Test
    public void 問い合わせが成功すること() {
        wd.get("http://www-demo.trident-qa.com/contact/");
        wd.findElement(By.name("your-name")).sendKeys("テストユーザー");
        wd.findElement(By.name("your-email")).sendKeys("***@***.com");
        wd.findElement(By.name("your-organization")).sendKeys("TRIDENT Inc.");
        wd.findElement(By.name("your-subject")).sendKeys("テスト");
        wd.findElement(By.name("your-messagef")).sendKeys("テスト送信です");
        wd.findElement(By.cssSelector("input.wpcf7-submit")).click();
    }
}

@@ -33,16 +33,71 @@
 pages;%0A%0A
+import java.util.Arrays;%0Aimport java.util.Collection;%0A%0A
 import o
@@ -160,16 +160,140 @@
 t.Test;%0A
+import org.junit.runner.RunWith;%0Aimport org.junit.runners.Parameterized;%0Aimport org.junit.runners.Parameterized.Parameters;%0A
 import o
@@ -345,32 +345,80 @@
 nium.WebDriver;%0A
+import org.openqa.selenium.chrome.ChromeDriver;%0A
 import org.openq
@@ -523,16 +523,46 @@
 apter;%0A%0A
+@RunWith(Parameterized.class)%0A
 public c
@@ -590,16 +590,58 @@
 eTest %7B%0A
+    private Class%3CWebDriver%3E driverClass;%0A
     priv
@@ -703,40 +703,100 @@
 p() 
-%7B%0A        wd = new FirefoxDriver
+throws InstantiationException, IllegalAccessException %7B%0A        wd = driverClass.newInstance
 ();%0A
@@ -947,24 +947,403 @@
      %7D%0A    %7D
+%0A%0A    @Parameters(name = %22%7B1%7D%22)%0A    public static Collection%3CObject%5B%5D%3E testData() %7B%0A        return Arrays.asList(new Object%5B%5D%5B%5D%7B%0A                %7BFirefoxDriver.class, %22Firefox%22%7D, %0A                %7BChromeDriver.class, %22Chrome%22%7D%0A        %7D);%0A    %7D%0A    %0A    public ContactPageSampleTest(Class%3CWebDriver%3E driverClass, String driverName) %7B%0A        this.driverClass = driverClass;%0A    %7D
 %0A    %0A    @T
@@ -1763,17 +1763,16 @@
 -message
-f
 %22)).send

Add Chrome test