Skip to main content

Posts

Showing posts from February, 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...