Skip to main content

Posts

Showing posts from 2018

Error Capturing -part 1

We need to capture some errors messages from the website we are testing. Here is our test case: 2.3 Check for validation 2 - Sign in 2.3.1: Launch hope page -http://automationpractice.com/index.php 2.2 .2: Click on link ‘Sign in’ 2.3.3 Under “Create Account” subheading, under ’Email address’ Enter email address that is already registered in text field 2.34 Click on Create an account button. 2.3.5 Capture error message ————————————————————— package com.automationpractice.AutomationPractice; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; /**  *  */ public class LaunchCloseApp { WebDriver driver ; @BeforeClass public void launchApp() { //instantiate Chrome Browser driver System.setProperty( "webdriver.chrome.driver" , "/Users/tester/Documents/webDrivers/chrome/chromedriver" ); driver ...

Date Picker 2 -Calendar

Working on date picking- part 2 package com.phpTravels.PHPTravels; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; public class LaunchClose { WebDriver driver ; @BeforeClass public void launchApp() { //instantiate Chrome Browser driver System.setProperty( "webdriver.chrome.driver" , "/Users/tester/Documents/webDrivers/chrome/chromedriver" ); driver = new ChromeDriver(); driver .get( "https://www.phptravels.net/" ); //boolean applaunch =driver.getCurrentUrl(); System. out .println( "browser has launched" ); } @AfterClass public void CloseApp() { driver .quit(); System. out .println( "browser has quite" ); } } Second class - package com.phpTravels.PHPTravels; import java.text.ParseException; import java.text.SimpleDateFormat; import java.util.D...

Date Picker 1- Calendar

Working on date picking - package com.phpTravels.PHPTravels; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.AfterClass; import org.testng.annotations.BeforeClass; public class LaunchClose { WebDriver driver ; @BeforeClass public void launchApp() { //instantiate Chrome Browser driver System.setProperty( "webdriver.chrome.driver" , "/Users/tester/Documents/webDrivers/chrome/chromedriver" ); driver = new ChromeDriver(); driver .get( "https://www.phptravels.net/" ); //boolean applaunch =driver.getCurrentUrl(); System. out .println( "browser has launched" ); } @AfterClass public void CloseApp() { driver .quit(); System. out .println( "browser has quite" ); } }  Second Class - package com.phpTravels.PHPTravels; import java.util.List; import org.openqa.selenium.By; import org.openqa.selenium.W...

Working with Software Downloads

Working with Software download. This testing does not requires user to subscribe to download software. User would have a limited time to then purchase software package com.consciousit.WebAndroidTest; import java.net.MalformedURLException; import org.openqa.selenium.By; import org.openqa.selenium.WebDriver; import org.openqa.selenium.chrome.ChromeDriver; import org.testng.annotations.AfterTest; import org.testng.annotations.BeforeTest; import org.testng.annotations.Test; public class ConsITLaptopTest { public WebDriver driver ; @BeforeTest public void beforeTest() { //instantiate Chrome Browser driver System.setProperty( "webdriver.chrome.driver" , "/Users/tester/Documents/webDrivers/chrome/chromedriver" ); driver = new ChromeDriver(); driver .get( "https://consciousit.co.uk" ); } @Test (priority=1) public void testDownloadBuy() throws MalformedURLException, InterruptedException { //d...

Working with Dropdownbox elements in Selenium WebDriver

How to select element from a Dropbox We are going to use Selenium webDriver and chrome driver to test this. In addition, this test was created on Mac.  I assume you have installed and setup java in your system path.  Also, install Eclipse for jee. 1. First let's take a look at a quick test case: Test case: TC_1. Register on http://automationpractice.com/index.php TC_1.1: Launch hope page -http://automationpractice.com/index.php TC_1.2 : Click on link ‘Sign in’ TC_1.3 : Under “Create Account” subheading, enter Email address in ‘Email address’ textfield TC_1.4 : Click on ‘Create an account’ button. —————————————————————————————— Test data: Email address: gorgeous12@hotmail.com http://automationpractice.com/index.php ---------------------------------------------------------------- Expected : http://automationpractice.com/index.php?controller=my-account ———————————------------ 2. Next, create a maven project in Eclipse 3....