0

STEP 1 このサイトのおかげで、Java、Eclipse、Selenium をインストールできました。 http://www.automationtestinghub.com/download-and-install-java/

ステップ 2 このコードのおかげで実行できました。

package firstPackage;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class ChromeTest {

    @Test
    public void LaunchChrome_method(){
        System.setProperty("webdriver.chrome.driver","D:\\Drivers\\chromedriver.exe"); 
        WebDriver driver= new ChromeDriver();
        driver.get("http://toolsqa.com/automation-practice-form/");



    }

}

次に、いくつかのテストを追加しました。

package firstPackage;

import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class ChromeTest {

    @Test
    public void LaunchChrome_method(){
        System.setProperty("webdriver.chrome.driver","D:\\Drivers\\chromedriver.exe"); 
        WebDriver driver= new ChromeDriver();
        driver.get("http://toolsqa.com/automation-practice-form/");

        // my first test
        driver.findElement(By.name("firstname")).sendKeys("ToolsQA");

        // my second test
        driver.findElement(By.id("sex-0")).click();

        // Unable to locate element
        boolean status = driver.findElement(By.id("UserName")).isDisplayed();


    }

}

ステップ3

しかし今、私の質問は次のとおりです。

テストが失敗または成功している場合、どうすればその「信号機」ビューを取得できますか?

Jenkins をインストールする必要がありますか?

4

1 に答える 1