Well, I work at intelij IDEA. So setUp write selenium tests, for example. be as follows:
1) install maven
- Unzip the distribution archive, i.e. apache-maven-3.0.4-bin.zip to the directory you want to install Maven 3.0.4. These instructions. Suppose you select C: \ Program Files \ Apache Software Foundation. a subdirectory apache-maven-3.0.4 will be created from the archive.
- Add the M2_HOME environment variable by opening the property system (WinKey + Pause), selecting the "Advanced" and "Environment Variables" tabs, then adding the M2_HOME variable in user variables with the value C: \ Program Files \ Apache Software Foundation \ apache-maven-3.0. 4. Be sure to omit the quotation marks around the path, even if they contain spaces.
- In the same dialog box, add the environment variable M2 in the user variables with the value% M2_HOME% \ bin.
2) install jdk 3) 
4) make sure that all environment variables that you set correctly
5) run intelij IDEA select "Project Structure" to install the installed JDK
6) click New.select jsdk. write the path where we installed java, for example C: \ Program Files \ Java \ jdk1.6.0_29
7) create a new project from scratch
8) maven module
nine)
ten)
11) add the appropriate POM dependencies: 
<dependency> <groupId>org.seleniumhq.selenium</groupId> <artifactId>selenium-java</artifactId> <version>2.24.1</version> </dependency>
12), if something else is underlined by a red line, press alt + enter on it β The idea should automatically suggest autoimport.
13) testing structure in the project 
14) the general structure of the test for selenium
import com.thoughtworks.selenium.SeleneseTestBase; import org.junit.After; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Test; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.WebElement; import org.openqa.selenium.firefox.FirefoxDriver; import java.util.concurrent.TimeUnit; public class HomePageTest extends SeleneseTestBase{ static WebDriver driver; @Before public void openFirefox(){ driver = new FirefoxDriver(); driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS); } @Test public void testHomePage(){ driver.get("https://www.google.by/"); WebElement search = driver.findElement(By.xpath("//*[@id=\"gbqfq\"]")); search.sendKeys("laptop"); search.submit(); } @After public void closeFirefox(){
15) also do not forget that you can export the created test to Selenium IDE as JUNIT4-selenium and open them in IDEA 
Hello
source share