POM Maven Project | Selenium Forum
M
Posted on 17/01/2016
i am struck at a point in POM Maven project where i have converted the normal POM project in to maven and copied all page classes and test cases in to maven packages, in base Test class Firefox driver isn't working
where as in the normal project it is working, i am referring to the current ongoing selenium Nov 2015 batch that's pom-7 video
below is the code and a error coming up on window key word...



package com.facebook.project.testcases;

import java.util.concurrent.TimeUnit;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
import com.facebook.project.pages.util.Constants;


public class BaseTest {
WebDriver driver;

public void init(String browserType){
if (browserType.equals("Mozilla"))
driver = new FirefoxDriver();
/*else if (browserType.equals("chrome"))
System.setProperty("webdriver.chrome.driver", Constants.CHROMEDRIVER_PATH);
driver = new ChromeDriver();*/

driver.manage().window().maximize(); // i am getting error on this line on window keyword with error message as tool tip = The method window() is undefined for the type WebDriver.Options
driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
}

}

M
Replied on 18/01/2016

please check all the jar files. see if there is any missing.