TESTNG WITH SELENIUM

The below prgm is executing and opening the browser witn@test annotaion but the program is geinng failed and browser is not opening with @beforemethod can u plss suggest me where iam doing wrng package pack1; my mailid:akramsam65@gmail.com

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.BeforeMethod;

public class NewTest {

@BeforeMethod
public void f() {
WebDriver wd = new FirefoxDriver();
wd.get(“https://gmail.com”);
}
}

akram Default Asked on May 19, 2015 in Selenium WebDriver.
Add Comment
1 Answer(s)

import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.testng.annotations.BeforeMethod;

public class NewTest {

WebDriver wd = new FirefoxDriver();

@BeforeMethod
public void f() {
WebDriver wd = new FirefoxDriver();
wd.get(“https://gmail.com”);
}
}
same problem with this also

akram Default Answered on May 19, 2015.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.