This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public abstract class CommonUtils { | |
| private static int timeout = 10; | |
| public CommonUtils() { | |
| _driver = DriverUtils.getDriver(); | |
| } | |
| public static WebDriver _driver; | |
| public WebDriverWait wait; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public class PurchaseOrderTest { | |
| public WebDriver driver; | |
| @BeforeClass | |
| public void setUp(){ | |
| driver = new FirefoxDriver(); | |
| } | |
| @Test(priority = 1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.java.headfirst.beatbox; | |
| import javax.sound.midi.*; | |
| import javax.swing.*; | |
| import javax.swing.border.Border; | |
| import java.awt.*; | |
| import java.awt.event.ActionEvent; | |
| import java.awt.event.ActionListener; | |
| import java.io.*; | |
| import java.util.ArrayList; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public enum Instrument { | |
| BASS_DRUM("Bass Drum", 35), | |
| SIDE_STICK("Side Stick", 37), | |
| CLOSED_HIGH_HAT("Closed High Hat", 42), | |
| OPEN_HIGH_HAT("Open High Hat", 46); | |
| private String label; | |
| private int drumKey; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| RemoteTestNG starting | |
| LOGIN_PAGE: Navigating to the Login page... | |
| Navigating to: https://the-internet.herokuapp.com/login | |
| Thread id = 1 | |
| LOGIN_PAGE: Header is: Login Page | |
| LOGIN_PAGE: Checking if the page elements display correctly. | |
| LOGIN_PAGE: Entering username. | |
| LOGIN_PAGE: Enter password. | |
| SECURE_AREA: Checking if the page elements display correctly. | |
| SECURE_AREA: Header is: Secure Area |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package tests; | |
| import base.DriverFactory; | |
| import static org.testng.Assert.assertEquals; | |
| import org.testng.annotations.Test; | |
| import utils.DriverUtils; | |
| import static enums.UserEnum.*; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package utils; | |
| import org.openqa.selenium.*; | |
| import org.openqa.selenium.NoSuchElementException; | |
| import org.openqa.selenium.interactions.Actions; | |
| import org.openqa.selenium.support.ui.ExpectedConditions; | |
| import org.openqa.selenium.support.ui.WebDriverWait; | |
| import org.testng.TestException; | |
| public abstract class CommonUtils { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public enum LoginPageEnum implements ISelector { | |
| HEADER("h2"), | |
| USERNAME("[name='username']"), | |
| PASSWORD("[name='password']"), | |
| LOGIN_BUTTON("[type='submit'][class='radius']"); | |
| String id; | |
| private LoginPageEnum(String Id){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package pages; | |
| import enums.UserEnum; | |
| import interfaces.ISelector; | |
| import org.openqa.selenium.By; | |
| import utils.CommonUtils; | |
| import static org.testng.Assert.assertTrue; | |
| public class LoginPage extends CommonUtils{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package utils; | |
| import org.openqa.selenium.*; | |
| import org.openqa.selenium.NoSuchElementException; | |
| import org.openqa.selenium.interactions.Actions; | |
| import org.openqa.selenium.support.ui.ExpectedConditions; | |
| import org.openqa.selenium.support.ui.WebDriverWait; | |
| import org.testng.TestException; | |
| public abstract class CommonUtils { |
NewerOlder