Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Selenium's note:

Kiet T. Tran

11 August 2015

This Java project contains various sample code using Selenium webdriver. For a W3C specification on webdriver, check this link.

Straight Selenium code

  • PetAdoptionTest1.java: Testing adopting one pet with one payment type. The test is exercised using the following brwoser drivers:

      + Chrome
      + Firefox 
      + Remote Chrome with Selenium Server
      + Remote Firefox with Selenium Server
      + Remote Headless browser (Ghost Driver) with PhamtomJS Ghost Driver.
    

The code is straight forward one string of activities contains all necessary steps to complete an adoption of one pet. Download Selenium Server here and PhantomJS Ghost Driver here. To run these standalone servers, use these commands:

	java -jar selenium-server-standalone-?.?.?.jar (?: version you download.
	phantomjs --webdriver=???? (????: port number. i.e., 8910)
  • PetAdoptionTest2.java: This class contains the same tests as PuppyAdoptionTest1 but broken down into smaller steps. Also, PageObject concept is also employed. The code can be refactored for better organization. That is done in PuppyAdoptionTest3.java.

  • PetAdoptionTest3.java: This class contains refactored code to introduce paymentInfo object. The test code is also refactored to extract common steps for reuse.

  • PetAdoptionTest4.java: This class contains negative path test code. I am looking into testing the error messages mainly from the payment page.