Showing posts with label How to setup selenium with eclipse. Show all posts
Showing posts with label How to setup selenium with eclipse. Show all posts

Thursday, November 12, 2015

Steps to setup Java and Maven environment in Bash profile

Follow below steps
1) Start the Terminal app.
2) Open bash profile - 
$ vi ~/.bash_profile
2) Press key 'i' from keyboard to Insert text in bash profile
3) Insert Java and maven environments -
export M2_HOME=/usr/local/apache-maven/apache-maven-3.3.3
export M2=$M2_HOME/bin
export PATH=$M2:$PATH
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
export PATH=$JAVA_HOME:$PATH

4) Press key 'Esc
4) Press key ':wq!' to save and quit bash profile
5) Now run source command to refresh
source ~/.bash_profile
6) Verify Java and Maven works fine
Run command - echo $JAVA_HOME
The response should be something like- /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home
Run command - mvn --version
The response should be something like-
Apache Maven 3.3.3 (7994120775791599e205a5524ec3e0dfe41d4a06; 2015-04-22T04:57:37-07:00)
Maven home: /usr/local/apache-maven/apache-maven-3.3.3
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_60.jdk/Contents/Home/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.1", arch: "x86_64", family: "mac"

7) Lastly, run maven project by cd into the Java project directory (enter your project path)- 
cd /Users/[User]/Documents/workspace/Hybrid_TestNG

and run command mvn test
This should run the project successfully. 

Remember, each time you start new session, you will have to source bash profile by running below command - 

source ~/.bash_profile

---------------------------------------------------------------------------------

Friday, October 9, 2015

Where is .m2 folder maven repository on mac?

Where is .m2 folder maven repository on mac? 

If you search directly it won't appear so please follow as below steps to see .M2 repository path.
Go-> Find folder ->  type this ~/.m2 and click go
"~/.m2 "

Tuesday, July 17, 2012

Steps to Install, setup or Configure Selenium

Following are the steps to configure/install Selenium in Eclipse(Java)

Note 1- Make sure you have  Java Runtime Environment (JRE) installed on your machine. Otherwise download it from http://java.com/en/download/index.jsp


Note 2 - If eclipse is not installed on your machine, download it from http://www.eclipse.org/downloads/. Click on Eclipse IDE for Java EE Developers.

1. Go to URL - http://seleniumhq.org/download/

2. From the section - Selenium Client Drivers, Click on the Download link of Java. A zip file will be downloaded, Extract the file.

3. Next, Open Eclipse -> Click on File -> New -> Project -> Java Project(Give it a name ex- install_selenium. Click on 'Next' and 'Finish'


4. Right click on Project name from the left toolbar(ex- install_selenium) -> Click on Properties -> Click on 'Java Build Path' from the left menu. Click on 'Libraries' from the top menu -> Click on 'Add External JARs' -> Browser and add all the selenium JARs files from the downloaded Selenium folder.


5. Click on OK.

Selenium is installed/configured.

Thanks