SlideShare a Scribd company logo
1 of 6
Selenium Guideline
1. Setup environment
a. InstallJDK 6 or later
b. InstallEclipse
c. InstallTestNG plugin for Eclipse from http://testng.org/doc/download.html
d. Download Selenium libraries for Java from
http://www.seleniumhq.org/download/
 Selenium StandaloneServer: selenium-server-standalone-x.x.x.jar
 Selenium Client and Webdriver: selenium-java-x.x.x.jar
2. How to work with Selenium-TestNG project
a. Configureproject
 ImportSelenium-TestNG:
o FromEclipse, you selects: File->Import->select General/Existing Projects
into Workspace->Next->Browser to Selenium folder->Finish
 Add the selenium libraries for Selenium-TestNG project
o FromEclipse, right click on Selenium-TestNG->Properties->Select Java
Build Path->Open Libraries tab->Add External JARS…-> browser to
selenium libraries (selenium-server-standalone-x.x.x.jar, selenium-java-
x.x.x.jar) -> OK
b. Structure of Selenium-TestNG project
 selenium package
o SeleniumActionBase.java: Including the selenium action (API) which
helps you interact with UI (web element) such as click, enter, get text, …
o SeleniumBrowserBase.java: Including theselenium action (API) which
help you interact with browser (IE, Firefox, Chrome) such as close
browser, navigate, closebrowser, …
 testmodule package
o Including the test module that you create such as TM_CreateIssue.java,
TM_Login.java
 test-output
o Including the test results after running test module. You can get more
information of test resultfromthis folder
c. How to create a test module
 Fromeclipse, right click on testmodule package->New->Class->Enter class
name (e.g: TM_Demo)->Finish. After finishing, the class look like as image
below:
 Next, you mustadd 2 methods which are “setup”, “tearDown” and at least
a test method. Following image below for more details
d. Run/debug test module and get result
 In order to run test module, right-click on test module (TM_Demo)->Run
As->TestNG Test
 In order to debug test script:
o Toggle breakpoint
o Then right-click on test module (TM_Demo)->Debug As->TestNG Test
 Get result: After running the test module, you can refer to “test-output”
folder to get test result
o The file of test result: // test-output/index.html

More Related Content

What's hot

Creating selenium remote control tests
Creating selenium remote control testsCreating selenium remote control tests
Creating selenium remote control testsDang Nguyen
 
Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorialprad_123
 
How to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHow to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHarshad Ingle
 
Designing keyword and Data Driven Automation framework with Selenium
Designing keyword and Data Driven Automation framework with SeleniumDesigning keyword and Data Driven Automation framework with Selenium
Designing keyword and Data Driven Automation framework with SeleniumEdureka!
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using SeleniumWeifeng Zhang
 
JUG Summer Camp - Une nouvelle vision des tests avec Arquillian
JUG Summer Camp - Une nouvelle vision des tests avec ArquillianJUG Summer Camp - Une nouvelle vision des tests avec Arquillian
JUG Summer Camp - Une nouvelle vision des tests avec ArquillianAlexis Hassler
 
Practical Tips & Tricks for Selenium Test Automation - Dave Haeffner
Practical Tips & Tricks for Selenium Test Automation - Dave HaeffnerPractical Tips & Tricks for Selenium Test Automation - Dave Haeffner
Practical Tips & Tricks for Selenium Test Automation - Dave HaeffnerApplitools
 
Installatieverslag Oracle Apex 4.0
Installatieverslag Oracle Apex 4.0Installatieverslag Oracle Apex 4.0
Installatieverslag Oracle Apex 4.0robinbuitenhuis
 
Selenium RC
Selenium  RCSelenium  RC
Selenium RCANKUR-BA
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Puneet Kala
 
Selenium – testing tool jack
Selenium – testing tool jackSelenium – testing tool jack
Selenium – testing tool jackJackseen Jeyaluck
 

What's hot (18)

Glassfish JEE Server Administration - Clustering
Glassfish JEE Server Administration - ClusteringGlassfish JEE Server Administration - Clustering
Glassfish JEE Server Administration - Clustering
 
Selenium With Spices
Selenium With SpicesSelenium With Spices
Selenium With Spices
 
Sel
SelSel
Sel
 
Creating selenium remote control tests
Creating selenium remote control testsCreating selenium remote control tests
Creating selenium remote control tests
 
Selenium Demo
Selenium DemoSelenium Demo
Selenium Demo
 
Installing java, eclipse and maven
Installing java, eclipse and mavenInstalling java, eclipse and maven
Installing java, eclipse and maven
 
Selenium Tutorial
Selenium TutorialSelenium Tutorial
Selenium Tutorial
 
How to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_frameworkHow to use_cucumber_rest-assured_api_framework
How to use_cucumber_rest-assured_api_framework
 
Designing keyword and Data Driven Automation framework with Selenium
Designing keyword and Data Driven Automation framework with SeleniumDesigning keyword and Data Driven Automation framework with Selenium
Designing keyword and Data Driven Automation framework with Selenium
 
Automated Web Testing Using Selenium
Automated Web Testing Using SeleniumAutomated Web Testing Using Selenium
Automated Web Testing Using Selenium
 
JUG Summer Camp - Une nouvelle vision des tests avec Arquillian
JUG Summer Camp - Une nouvelle vision des tests avec ArquillianJUG Summer Camp - Une nouvelle vision des tests avec Arquillian
JUG Summer Camp - Une nouvelle vision des tests avec Arquillian
 
Practical Tips & Tricks for Selenium Test Automation - Dave Haeffner
Practical Tips & Tricks for Selenium Test Automation - Dave HaeffnerPractical Tips & Tricks for Selenium Test Automation - Dave Haeffner
Practical Tips & Tricks for Selenium Test Automation - Dave Haeffner
 
Installatieverslag Oracle Apex 4.0
Installatieverslag Oracle Apex 4.0Installatieverslag Oracle Apex 4.0
Installatieverslag Oracle Apex 4.0
 
Selenium RC
Selenium  RCSelenium  RC
Selenium RC
 
Jsf 2.0 in depth
Jsf 2.0 in depthJsf 2.0 in depth
Jsf 2.0 in depth
 
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
Selenium-Webdriver With PHPUnit Automation test for Joomla CMS!
 
Selenium – testing tool jack
Selenium – testing tool jackSelenium – testing tool jack
Selenium – testing tool jack
 
JDBC
JDBCJDBC
JDBC
 

Similar to Selenium guideline

Selenium topic 4 - Selenium Web Driver Set Up
Selenium topic 4 - Selenium Web Driver Set UpSelenium topic 4 - Selenium Web Driver Set Up
Selenium topic 4 - Selenium Web Driver Set UpITProfessional Academy
 
Automated UI testing with Selenium
Automated UI testing with SeleniumAutomated UI testing with Selenium
Automated UI testing with SeleniumYuriy Gerasimov
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch  Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch Haitham Refaat
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialRaghavan Mohan
 
Selenium webdriver Setup | Selenium Webdriver with Java and Eclipse Setup
Selenium webdriver Setup | Selenium Webdriver with Java and Eclipse Setup Selenium webdriver Setup | Selenium Webdriver with Java and Eclipse Setup
Selenium webdriver Setup | Selenium Webdriver with Java and Eclipse Setup ComputerTrainingsOnline
 
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011camp_drupal_ua
 
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011Yuriy Gerasimov
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Gopi Raghavendra
 
Arquillian in a nutshell
Arquillian in a nutshellArquillian in a nutshell
Arquillian in a nutshellBrockhaus Group
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With SeleniumMarakana Inc.
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Appschrisb206 chrisb206
 
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...Rashedul Islam
 
Selenium RC, Selenium WebDriver and HP LoadRunner
Selenium RC, Selenium WebDriver and HP LoadRunnerSelenium RC, Selenium WebDriver and HP LoadRunner
Selenium RC, Selenium WebDriver and HP LoadRunnerMurageppa-QA
 
Install spark on_windows10
Install spark on_windows10Install spark on_windows10
Install spark on_windows10Ajay Ohri
 
First steps with selenium rc
First steps with selenium rcFirst steps with selenium rc
First steps with selenium rcDang Nguyen
 

Similar to Selenium guideline (20)

Selenium topic 4 - Selenium Web Driver Set Up
Selenium topic 4 - Selenium Web Driver Set UpSelenium topic 4 - Selenium Web Driver Set Up
Selenium topic 4 - Selenium Web Driver Set Up
 
Automated UI testing with Selenium
Automated UI testing with SeleniumAutomated UI testing with Selenium
Automated UI testing with Selenium
 
Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch  Step by step - Selenium 3 web-driver - From Scratch
Step by step - Selenium 3 web-driver - From Scratch
 
Selenium Testing
Selenium Testing Selenium Testing
Selenium Testing
 
Java, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorialJava, Eclipse, Maven & JSF tutorial
Java, Eclipse, Maven & JSF tutorial
 
Selenium webdriver Setup | Selenium Webdriver with Java and Eclipse Setup
Selenium webdriver Setup | Selenium Webdriver with Java and Eclipse Setup Selenium webdriver Setup | Selenium Webdriver with Java and Eclipse Setup
Selenium webdriver Setup | Selenium Webdriver with Java and Eclipse Setup
 
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011Automated UI testing.Selenium.DrupalCamp Kyiv 2011
Automated UI testing.Selenium.DrupalCamp Kyiv 2011
 
Selenium basic
Selenium basicSelenium basic
Selenium basic
 
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011Automated UI testing. Selenium. DrupalCamp Kyiv 2011
Automated UI testing. Selenium. DrupalCamp Kyiv 2011
 
Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)Maven TestNg frame work (1) (1)
Maven TestNg frame work (1) (1)
 
Arquillian in a nutshell
Arquillian in a nutshellArquillian in a nutshell
Arquillian in a nutshell
 
Selenium
SeleniumSelenium
Selenium
 
Testing Java Web Apps With Selenium
Testing Java Web Apps With SeleniumTesting Java Web Apps With Selenium
Testing Java Web Apps With Selenium
 
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-AppsSelenium-Browser-Based-Automated-Testing-for-Grails-Apps
Selenium-Browser-Based-Automated-Testing-for-Grails-Apps
 
Maven Setup
Maven SetupMaven Setup
Maven Setup
 
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
Step 8_7_ 6_5_4_3_2_ 1 in one_Tutorial for Begineer on Selenium Web Driver-Te...
 
Selenium RC, Selenium WebDriver and HP LoadRunner
Selenium RC, Selenium WebDriver and HP LoadRunnerSelenium RC, Selenium WebDriver and HP LoadRunner
Selenium RC, Selenium WebDriver and HP LoadRunner
 
Arquillian in a nutshell
Arquillian in a nutshellArquillian in a nutshell
Arquillian in a nutshell
 
Install spark on_windows10
Install spark on_windows10Install spark on_windows10
Install spark on_windows10
 
First steps with selenium rc
First steps with selenium rcFirst steps with selenium rc
First steps with selenium rc
 

Recently uploaded

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxJisc
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxannathomasp01
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptNishitharanjan Rout
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxPooja Bhuva
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSAnaAcapella
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Jisc
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxCeline George
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsSandeep D Chaudhary
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactisticshameyhk98
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17Celine George
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningMarc Dusseiller Dusjagr
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17Celine George
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxPooja Bhuva
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfPondicherry University
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxRamakrishna Reddy Bijjam
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxDr. Sarita Anand
 

Recently uploaded (20)

Wellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptxWellbeing inclusion and digital dystopias.pptx
Wellbeing inclusion and digital dystopias.pptx
 
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptxCOMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
COMMUNICATING NEGATIVE NEWS - APPROACHES .pptx
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
AIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.pptAIM of Education-Teachers Training-2024.ppt
AIM of Education-Teachers Training-2024.ppt
 
Interdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptxInterdisciplinary_Insights_Data_Collection_Methods.pptx
Interdisciplinary_Insights_Data_Collection_Methods.pptx
 
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPSSpellings Wk 4 and Wk 5 for Grade 4 at CAPS
Spellings Wk 4 and Wk 5 for Grade 4 at CAPS
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 
How to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptxHow to setup Pycharm environment for Odoo 17.pptx
How to setup Pycharm environment for Odoo 17.pptx
 
OSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & SystemsOSCM Unit 2_Operations Processes & Systems
OSCM Unit 2_Operations Processes & Systems
 
Philosophy of china and it's charactistics
Philosophy of china and it's charactisticsPhilosophy of china and it's charactistics
Philosophy of china and it's charactistics
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17How to Add New Custom Addons Path in Odoo 17
How to Add New Custom Addons Path in Odoo 17
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
dusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learningdusjagr & nano talk on open tools for agriculture research and learning
dusjagr & nano talk on open tools for agriculture research and learning
 
How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17How to Add a Tool Tip to a Field in Odoo 17
How to Add a Tool Tip to a Field in Odoo 17
 
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptxOn_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
On_Translating_a_Tamil_Poem_by_A_K_Ramanujan.pptx
 
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdfFICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
FICTIONAL SALESMAN/SALESMAN SNSW 2024.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 

Selenium guideline

  • 1. Selenium Guideline 1. Setup environment a. InstallJDK 6 or later b. InstallEclipse c. InstallTestNG plugin for Eclipse from http://testng.org/doc/download.html d. Download Selenium libraries for Java from http://www.seleniumhq.org/download/  Selenium StandaloneServer: selenium-server-standalone-x.x.x.jar  Selenium Client and Webdriver: selenium-java-x.x.x.jar 2. How to work with Selenium-TestNG project a. Configureproject  ImportSelenium-TestNG: o FromEclipse, you selects: File->Import->select General/Existing Projects into Workspace->Next->Browser to Selenium folder->Finish  Add the selenium libraries for Selenium-TestNG project o FromEclipse, right click on Selenium-TestNG->Properties->Select Java Build Path->Open Libraries tab->Add External JARS…-> browser to selenium libraries (selenium-server-standalone-x.x.x.jar, selenium-java- x.x.x.jar) -> OK
  • 2. b. Structure of Selenium-TestNG project  selenium package o SeleniumActionBase.java: Including the selenium action (API) which helps you interact with UI (web element) such as click, enter, get text, … o SeleniumBrowserBase.java: Including theselenium action (API) which help you interact with browser (IE, Firefox, Chrome) such as close browser, navigate, closebrowser, …  testmodule package o Including the test module that you create such as TM_CreateIssue.java, TM_Login.java  test-output o Including the test results after running test module. You can get more information of test resultfromthis folder c. How to create a test module  Fromeclipse, right click on testmodule package->New->Class->Enter class name (e.g: TM_Demo)->Finish. After finishing, the class look like as image below:
  • 3.  Next, you mustadd 2 methods which are “setup”, “tearDown” and at least a test method. Following image below for more details
  • 4. d. Run/debug test module and get result  In order to run test module, right-click on test module (TM_Demo)->Run As->TestNG Test
  • 5.  In order to debug test script: o Toggle breakpoint o Then right-click on test module (TM_Demo)->Debug As->TestNG Test
  • 6.  Get result: After running the test module, you can refer to “test-output” folder to get test result o The file of test result: // test-output/index.html