Basic Things Require to Run Selenium Project on Windows Machine
How to Set Java path after java Installation:
- Set Java Path Right Click on My Computer-> Properties-> Advanced System Settings-> Environment Variable->check Is there any path in System Variable if not Click on New put Variable Name Path, Variable Value Java path up to Bin folder. if there is already Path then paste in it at the end, after semicolon.
e.g.C:\Program Files\Java\jdk1.8.0_211\bin
- Install Eclipse Java 2019-09 or Any Latest Version
- Download selenium-standalone jar file or Selenium Jar files & extract it.
- Download Chrome Driver 79.0.3945.36 (If you are using Chrome version 79)
Selenium Project with TestNG
Three ways to Install TestNG with Eclipse IDE:
1. Install TestNG in Eclipse directly from the Eclipse Marketplace.
- Click on the “Eclipse Marketplace…” option listed under the help menu.
- “Find” input field, write “TestNG” and press enter to search.
- “Find” input field, write “TestNG” and press enter to search.
- There you’ll see an “Install” button with every result that appears in the search.
- Press it to continue installing the TestNG for Eclipse.
2. Installing TestNG Plugin in Eclipse using the “Install New Software…” feature.
- On the menu bar, click Help.
- Choose the "Install New Software…" option.
- In the Eclipse Install dialog box
- Enter "http://beust.com/eclipse/" in the Work with box
- Click the Add button.
- In Add repository dialog
- Enter "TestNG" in Name Text Field
- Click on Add button.
- Select the "TestNG" checkbox
- Click on the "Next" button.
- It will give you a review of Items to be installed. Click on Next.
- Select the radio button "I accept the terms of the license agreement"
- Click on Finish
If you encounter a Security warning, just click "Install Anyway".
Wait for the installation to finish. When Eclipse prompts you for a restart, click "Restart now."
After the restart, verify if TestNG was indeed successfully installed. Click Window > Show View > Other.
3. Install TestNG in Eclipse IDE via offline Jar files.
- Firstly download the latest TestNG Jar files. download the TestNG version 6.11.
- download the “site_assembly.zip” file for the TestNG version 6.11. This file contains two folders named as “features” and “plugins“.
The features folder contains the following two files.
org.testng.eclipse.maven.feature_6.11.0.201703011520.jar
org.testng.eclipse_6.11.0.201703011520.jar
The plugins folder contains these two files.
org.testng.eclipse.maven_6.11.0.201703011520.jar
org.testng.eclipse_6.11.0.201703011520.jar
Go to the eclipse installation directory and look for the “dropins” folder there.
Create a folder inside the dropins folder and name it as “testng-eclipse-6.11“.
6->Major version & 11->Minor version of the TestNG plugin.
Extract the “site_assembly.zip” file and copy its content i.e. the “features” and “plugins” folders to the newly created “testng-eclipse-6.11” directory.
Last but not the least, you will need to restart or start the Eclipse to see the TestNG plugin getting loaded into the IDE. However, the process would be slightly slow as the Eclipse will first time load the new plugin.
From Eclipse, by pressing CTRL+N, you can open the “New” wizard. It will load the list of all available module/project templates. By scrolling down in the list, you can make sure that it has the “TestNG” option.
No comments:
Post a Comment