본문 바로가기
IT/UITEST

UI-Test-01

by dya0 2019. 5. 6.



 

package ex1;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;

public class Exam_01 {
	public static void main(String[] args) {
		//크롬 드라이버 위치 지정 필수 코드 
		System.setProperty("webdriver.chrome.driver", "D:\\seleniumlib\\chromedriver.exe");
		WebDriver driver = new ChromeDriver();
		//브라우저 첫 주소 작성 - get() 시작, close() 닫는다
		driver.get("https://www.naver.com"); 
		driver.close(); // 꼭 해줘야 함 브라우저 창이 열린 뒤 닫혀 다음 예제 부터는 주석 처리
	}
}