Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions .idea/codeStyles/Project.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 5 additions & 0 deletions .idea/codeStyles/codeStyleConfig.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions .idea/runConfigurations.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

124 changes: 124 additions & 0 deletions .idea/uiDesigner.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions Configuration.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
browser = chrome
url=https://www.automationexercise.com
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# UIProjectJUnit
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
<configuration>
<source>12</source>
<target>12</target>
<source>11</source>
<target>11</target>
</configuration>
</plugin>

Expand Down
75 changes: 75 additions & 0 deletions src/test/java/pages/CartPage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
package pages;

import org.junit.Assert;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import utilities.Driver;

public class CartPage {
public CartPage(){
PageFactory.initElements(Driver.getDriver(),this);
}
@FindBy(xpath ="//*[text()='Shopping Cart'] " )
public WebElement cartPage ;

@FindBy(xpath ="//*[text()='Proceed To Checkout']" )
public WebElement proceedToCheckout ;

@FindBy(xpath = "(//li[@class='address_address1 address_address2'])[2]" )
public WebElement deliveryAddress;

@FindBy(xpath = "(//li[@class='address_address1 address_address2'])[5]" )
public WebElement billingAddress;

@FindBy(xpath = "(//h2)[1]")
public WebElement addressDetails;

@FindBy(xpath = "(//h2)[2]")
public WebElement reviewOrder;

@FindBy(xpath ="(//a[@href='/login'])[2]" )
public WebElement registerLogin;

@FindBy(name ="message")
public WebElement commentText;

@FindBy(xpath = "//*[@href='/payment']")
public WebElement placeOrder;

@FindBy(name = "name_on_card")
public WebElement nameOnCard;

@FindBy(name ="card_number")
public WebElement cardNumber;

@FindBy(xpath = "//*[@name='cvc']")
public WebElement cvs;

@FindBy(name ="expiry_month")
public WebElement expiryMonth;

@FindBy(name ="expiry_year")
public WebElement expiryYear;

@FindBy(id ="submit")
public WebElement payAndConfirmOrder;

@FindBy(xpath ="//*[contains(text(),'Your order has been')]")
public WebElement successMessage;

@FindBy(xpath = "//a[@href='/download_invoice/500']")

public WebElement downlandInvoiceButton;

@FindBy (xpath = "//a[@data-qa='continue-button']" )
public WebElement continueButton;


@FindBy (xpath = "//a[@class='cart_quantity_delete']" )
public WebElement deleteButton;

@FindBy(xpath = "//*[text()='Cart is empty!']")
public WebElement cartEmptyText;
}
49 changes: 49 additions & 0 deletions src/test/java/pages/ContactUsPage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
package pages;

import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;
import org.openqa.selenium.support.PageFactory;
import utilities.Driver;


public class ContactUsPage {
public ContactUsPage() {
PageFactory.initElements(Driver.getDriver(), this);
}

@FindBy(xpath = "(//h2)[2]")
public WebElement getInTouchText ;

@FindBy(name = "name")
public WebElement nameText;

@ FindBy(name="email")
public WebElement email;

@ FindBy(name="subject")
public WebElement subject;

@ FindBy(name="message")
public WebElement message;

@ FindBy(name="upload_file")
public WebElement uploadFile;

@ FindBy(name="submit")
public WebElement submit;

@ FindBy(xpath= "//*[text()='Success! Your details have been submitted successfully.']")
public WebElement successMessage;

}











11 changes: 11 additions & 0 deletions src/test/java/pages/DeletePage.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
package pages;

import org.openqa.selenium.support.PageFactory;
import utilities.Driver;

public class DeletePage {
public DeletePage(){
PageFactory.initElements(Driver.getDriver(),this);
}

}
Loading