SELENIUM JAVA TUTORIAL INTELIJ CODE
Paste the following code in adle.įinally we need to create a gradle task to execute cucumber test cases. Now we need to add configuration for cucumber so that our corresponding task will be able to execute.
By default mavencentral is always there, if not then just copy paste the following code in your adle. Add following dependencies in adle.Ĭompile ':selenium-server:2.44.0'Ĭompile group: '', name: 'selenium-java', version: '3.4.0'Ĭompile group: 'info.cukes', name: 'cucumber-testng', version: '1.2.5'Ĭompile group: 'info.cukes', name: 'cucumber-java', version: '1.2.5' Just like we have dependencies in Maven, we need to add the same in our gradle file. Here we make all the configuration related to our project. Once project is configured, you’ll see adle file along with some other gradle related stuff like gradlew, adle etc.īadle is same as pom.xml file in maven. Select “Gradle Wrapper” when asked during the process. But at the moment, we are just going to stick to Java.
Open File > New > Project and select Gradle. Check Java under Additional Libraries and Frameworks. Lets quickly create a Gradle project in IntelliJ. Purpose is to move from maven to gradle to get more options and flexibility which is helpful in CI/CD integration. Using Selenium with Cucumber and Gradle instead of Maven.