Toggle navigation
Home
(current)
Selenium Training
Course Details
Free Videos
Support Forum
QTP UFT Training
Course Details
Free Videos
Support Forum
Appium Training
Course Details
Free Videos
Support Forum
Contact Us
(current)
All Courses
(current)
Login
(current)
Avail Discount
Name
Email
Phone Number
Tools
Selenium
QTP/UFT
Appium
Enroll Now
Home
Forum
Selenium Forum
Unable to initiate Chrome Browser in Junit in selenium webdr
Unable to initiate Chrome Browser in Junit in selenium webdr
M
Posted on 09/10/2016
I am trying to run the below code in Junit however I am unable to initiate the chrome browser, please help!!
package ChromeText;
import org.junit.AfterClass;
import org.junit.BeforeClass;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
public class ChromeTest {
private static WebDriver driver;
@BeforeClass
public static void setUp(){
System.setProperty("webdriver.chrome.driver", "C:\\Users\\test.user\\Documents\\chromedriver_win32\\chromedriver.exe");
driver = new ChromeDriver();
}
@Test
public void testChromeSelenium() {
driver.get("http://www.google.com");
}
@AfterClass
public static void kill(){
if (driver != null) {
driver.close();
driver.quit();
}
}
}
M
Replied on 10/10/2016
do you get any error?