diff --git a/.idea/workspace.xml b/.idea/workspace.xml index ae51301..72be4ea 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -1,12 +1,52 @@ + + - - - + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - { + "keyToString": { + "ASKED_SHARE_PROJECT_CONFIGURATION_FILES": "true", + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "SHARE_PROJECT_CONFIGURATION_FILES": "true", + "last_opened_file_path": "H:/github/newdirectory/students2023", + "project.structure.last.edited": "Project", + "project.structure.proportion": "0.15", + "project.structure.side.proportion": "0.2", + "settings.editor.selected.configurable": "preferences.pluginManager" } -}]]> +} diff --git a/sheba/.idea/encodings.xml b/sheba/.idea/encodings.xml index 63e9001..aa00ffa 100644 --- a/sheba/.idea/encodings.xml +++ b/sheba/.idea/encodings.xml @@ -2,5 +2,6 @@ + \ No newline at end of file diff --git a/sheba/.idea/runConfigurations.xml b/sheba/.idea/runConfigurations.xml deleted file mode 100644 index 797acea..0000000 --- a/sheba/.idea/runConfigurations.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/sheba/.settings/org.eclipse.jdt.apt.core.prefs b/sheba/.settings/org.eclipse.jdt.apt.core.prefs index d4313d4..dfa4f3a 100644 --- a/sheba/.settings/org.eclipse.jdt.apt.core.prefs +++ b/sheba/.settings/org.eclipse.jdt.apt.core.prefs @@ -1,2 +1,4 @@ eclipse.preferences.version=1 -org.eclipse.jdt.apt.aptEnabled=false +org.eclipse.jdt.apt.aptEnabled=true +org.eclipse.jdt.apt.genSrcDir=target/generated-sources/annotations +org.eclipse.jdt.apt.genTestSrcDir=target/generated-test-sources/test-annotations diff --git a/sheba/.settings/org.eclipse.jdt.core.prefs b/sheba/.settings/org.eclipse.jdt.core.prefs index b11489f..20b3c67 100644 --- a/sheba/.settings/org.eclipse.jdt.core.prefs +++ b/sheba/.settings/org.eclipse.jdt.core.prefs @@ -4,6 +4,6 @@ org.eclipse.jdt.core.compiler.compliance=1.7 org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=ignore -org.eclipse.jdt.core.compiler.processAnnotations=disabled +org.eclipse.jdt.core.compiler.processAnnotations=enabled org.eclipse.jdt.core.compiler.release=disabled org.eclipse.jdt.core.compiler.source=1.7 diff --git a/sheba/.vscode/settings.json b/sheba/.vscode/settings.json new file mode 100644 index 0000000..8f2b711 --- /dev/null +++ b/sheba/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "java.compile.nullAnalysis.mode": "disabled" +} \ No newline at end of file diff --git a/subroto/getwell/.gitignore b/subroto/getwell/.gitignore new file mode 100644 index 0000000..74f23f6 --- /dev/null +++ b/subroto/getwell/.gitignore @@ -0,0 +1,8 @@ +target/ +allure-results/ +.idea/ + +### Maven ### +target/ + +workspace.xml/ \ No newline at end of file diff --git a/subroto/getwell/.idea/copyright/Subroto_Kumar_Paul.xml b/subroto/getwell/.idea/copyright/Subroto_Kumar_Paul.xml new file mode 100644 index 0000000..8429158 --- /dev/null +++ b/subroto/getwell/.idea/copyright/Subroto_Kumar_Paul.xml @@ -0,0 +1,5 @@ + + + + \ No newline at end of file diff --git a/subroto/getwell/.idea/uiDesigner.xml b/subroto/getwell/.idea/uiDesigner.xml new file mode 100644 index 0000000..2b63946 --- /dev/null +++ b/subroto/getwell/.idea/uiDesigner.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/subroto/getwell/Testngsuite.xml b/subroto/getwell/Testngsuite.xml new file mode 100644 index 0000000..bdf37a0 --- /dev/null +++ b/subroto/getwell/Testngsuite.xml @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/subroto/getwell/pom.xml b/subroto/getwell/pom.xml index f816dae..610b2a8 100644 --- a/subroto/getwell/pom.xml +++ b/subroto/getwell/pom.xml @@ -4,7 +4,7 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 - com.pranrfl.getwell + com.gits.herokuapp getwell 1.0-SNAPSHOT @@ -14,39 +14,44 @@ UTF-8 - 1.7 + 1.8 20 + 1.8.10 - - junit - junit - 4.13.2 - test - - org.seleniumhq.selenium selenium-java 4.8.3 - + + org.testng + testng + 7.7.1 + test + + + + + io.qameta.allure + allure-testng + 2.21.0 + + - + - maven-clean-plugin 3.1.0 - maven-resources-plugin 3.0.2 @@ -57,7 +62,22 @@ maven-surefire-plugin - 2.22.1 + 2.18.1 + + + Testngsuite.xml + + + -javaagent:"${settings.localRepository}/org/aspectj/aspectjweaver/${aspectj.version}/aspectjweaver-${aspectj.version}.jar" + + + + + org.aspectj + aspectjweaver + ${aspectj.version} + + maven-jar-plugin @@ -71,7 +91,6 @@ maven-deploy-plugin 2.8.2 - maven-site-plugin 3.7.1 diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Configuaration/BaseClass.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Configuaration/BaseClass.java new file mode 100644 index 0000000..6e5f019 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Configuaration/BaseClass.java @@ -0,0 +1,50 @@ +package com.gits.herokuapp.Configuaration; + + +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.chrome.ChromeDriver; +import org.testng.annotations.AfterClass; +import org.testng.annotations.AfterMethod; +import org.testng.annotations.BeforeClass; +import org.testng.annotations.BeforeMethod; + +import java.util.concurrent.TimeUnit; + +public class BaseClass { + + public WebDriver driver; + + @BeforeClass + public void beforeClass(){ + driver = new ChromeDriver(); + driver.manage().window().maximize(); + driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS); + + } + + @BeforeMethod + public void beforeMethod(){ + driver.get("https://the-internet.herokuapp.com/"); + sleepTime(1000); + + } + + @AfterMethod + public void afterMethod(){ + System.out.println("method is passing"); + + } + + @AfterClass + public void afterClass(){ + driver.quit(); + + } + + public static void sleepTime(long sleepTime){ + try { Thread.sleep(sleepTime); + }catch (Exception e) { + } + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Configuaration/BasePage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Configuaration/BasePage.java new file mode 100644 index 0000000..75b8086 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Configuaration/BasePage.java @@ -0,0 +1,22 @@ +package com.gits.herokuapp.Configuaration; + +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.support.PageFactory; + +public abstract class BasePage { + + public WebDriver driver; + + public BasePage (WebDriver driver){ + this.driver = driver; + this.inItPage(); + } + + + public void inItPage() { + PageFactory.initElements(driver, this); + + } + + + } diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/FormAuthentication.java b/subroto/getwell/src/test/java/com/gits/herokuapp/FormAuthentication.java deleted file mode 100644 index 0f41e1d..0000000 --- a/subroto/getwell/src/test/java/com/gits/herokuapp/FormAuthentication.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.gits.herokuapp; - -import org.openqa.selenium.By; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.chrome.ChromeDriver; - -public class FormAuthentication { - public static void main(String[] args) { - - - WebDriver driver = new ChromeDriver(); - - driver.get("https://the-internet.herokuapp.com/"); - driver.manage().window().maximize(); - try { - Thread.sleep(2000); - }catch (InterruptedException e){ - throw new RuntimeException(e); - } - driver.findElement(By.cssSelector("#content > ul > li:nth-child(21) > a")).click(); - try { - Thread.sleep(2000); - }catch (InterruptedException e){ - throw new RuntimeException(e); - } - - - driver.close(); - driver.quit(); - - - } -} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/LandingPageConfiguaration/LandingPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/LandingPageConfiguaration/LandingPage.java new file mode 100644 index 0000000..fac8803 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/LandingPageConfiguaration/LandingPage.java @@ -0,0 +1,175 @@ +package com.gits.herokuapp.LandingPageConfiguaration; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class LandingPage extends BasePage { + + public LandingPage(WebDriver driver) { + super(driver); + } + + @FindBy(css = "#content > ul > li:nth-child(1) > a") + public WebElement ABTesting; + public WebElement getABTesting() { + return ABTesting; + } + + @FindBy(css = "#content > ul > li:nth-child(2) > a") + public WebElement addRemoveElement; + public WebElement getAddRemoveElement() { + return addRemoveElement; + } + + + @FindBy(css = "#content > ul > li:nth-child(3) > a") + public WebElement BasicAuthentication; + public WebElement getBasicAuthentication() { + return BasicAuthentication; + } + + + @FindBy(css = "#content > ul > li:nth-child(3) > a") + public WebElement BrokenImage; + public WebElement getBrokenImage(){ + return BrokenImage; + } + + + @FindBy(css = "#content > ul > li:nth-child(6) > a") + public WebElement CheckBoxes; + public WebElement getCheckBoxes(){ + return CheckBoxes; + } + + @FindBy(css = "#content > ul > li:nth-child(7) > a") + public WebElement ContextMenu; + public WebElement getContextMenu(){ + return ContextMenu; + } + + @FindBy(css = "#content > ul > li:nth-child(9) > a") + public WebElement DisappearingElement; + public WebElement getDisappearingElement(){ + return DisappearingElement; + } + + @FindBy(css = "#content > ul > li:nth-child(8) > a") + public WebElement DigestAuthentication; + public WebElement getDigestAuthentication(){ + return DigestAuthentication; + } + + @FindBy(css = "#content > ul > li:nth-child(10) > a") + public WebElement DragAndDrop; + public WebElement getDragAndDrop(){ + return DragAndDrop; + } + + @FindBy(css = "#content > ul > li:nth-child(11) > a") + public WebElement DropDown; + public WebElement getDropDown(){ + return DropDown; + } + + @FindBy(css = "#content > ul > li:nth-child(12) > a") + public WebElement DynamicContent; + public WebElement getDynamicContent(){ + return DynamicContent; + } + + @FindBy(css = "#content > ul > li:nth-child(13) > a") + public WebElement DynamicControls; + public WebElement getDynamicControls(){ + return DynamicControls; + } + + @FindBy(css = "#content > ul > li:nth-child(17) > a") + public WebElement FileDownLoad; + public WebElement getFileDownLoad(){ + return FileDownLoad; + } + + @FindBy(css = "#content > ul > li:nth-child(18) > a") + public WebElement FileUpload; + public WebElement getFileUpload(){ + return FileUpload; + } + + @FindBy(css = "#content > ul > li:nth-child(20) > a") + public WebElement ForgotPassword; + public WebElement getForgotPassword(){ + return ForgotPassword; + } + + @FindBy(css = "#content > ul > li:nth-child(21) > a") + public WebElement formAuthentication; + public WebElement getFormAuthentication() { + return formAuthentication; + } + + @FindBy(css = "#content > ul > li:nth-child(24) > a") + public WebElement HorizontalSlider; + public WebElement getHorizontalSlider(){ + return HorizontalSlider; + } + + @FindBy(css = "#content > ul > li:nth-child(34) > a") + public WebElement NestedFrames; + public WebElement getNestedFrames(){ + return NestedFrames; + } + + @FindBy(css = "#content > ul > li:nth-child(22) > a") + public WebElement Frames; + public WebElement getFrames(){ + return Frames; + } + + @FindBy(css = "#content > ul > li:nth-child(26) > a") + public WebElement InfiniteScroll; + public WebElement getInfiniteScroll(){ + return InfiniteScroll; + } + + @FindBy(css = "#content > ul > li:nth-child(25) > a") + public WebElement MouseHover; + public WebElement getMouseHover(){ + return MouseHover; + } + + @FindBy(css = "#content > ul > li:nth-child(27) > a") + public WebElement Inputs; + public WebElement getInputs(){ + return Inputs; + } + + @FindBy(css = "#content > ul > li:nth-child(29) > a") + public WebElement JavaScriptAlert; + public WebElement getJavaScriptAlert(){ + return JavaScriptAlert; + } + + @FindBy(css = "#content > ul > li:nth-child(33) > a") + public WebElement MultipleWindow; + public WebElement getMultipleWindow(){ + return MultipleWindow; + } + + @FindBy(css = "#content > ul > li:nth-child(35) > a") + public WebElement NotificationMessage; + public WebElement getNotificationMessage(){ + return NotificationMessage; + } + + @FindBy(css = "#content > ul > li:nth-child(36) > a") + public WebElement ReDirectLink; + public WebElement getReDirectLink(){ + return ReDirectLink; + } + + + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/AbTesting.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/AbTesting.java new file mode 100644 index 0000000..8d508a2 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/AbTesting.java @@ -0,0 +1,47 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class AbTesting extends BasePage { + + //Extend From base page. after inherit this function came super came from child class + public AbTesting(WebDriver driver) { + super(driver); + } + + + //ABTesting Variation1 not working css locator + +// @FindBy(css = "#content > div > h3") +// public WebElement abTestingVariation1; +// public WebElement getabTestingVariation1(){ +// return abTestingVariation1; +// } + + + //ABTesting Variation1 + @FindBy(xpath="//div[@id='content']//h3[.='A/B Test Variation 1']") + public WebElement abTestingVariation1; + public WebElement getabTestingVariation1(){ + return abTestingVariation1; + } + + //AB test Control + @FindBy(css="#content div h3") + public WebElement abTestControl; + public WebElement getAbTestControl (){ + + return abTestControl; + } + //Paragraph + @FindBy(xpath="//div[@id='content']//p") + public WebElement abTestingParagraph; + public WebElement getAbTestingParagraph(){ + return abTestingParagraph; + } + + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/AddRemoveElements.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/AddRemoveElements.java new file mode 100644 index 0000000..a6c0ad1 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/AddRemoveElements.java @@ -0,0 +1,65 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class AddRemoveElements extends BasePage { + public AddRemoveElements(WebDriver driver) { + super(driver); + } + + //Header + @FindBy(css= "div#content > h3") + public WebElement addRemoveElementsHeader; + public WebElement getaddRemoveElementsHeader(){ + return addRemoveElementsHeader; + } + + //css locator can't find add delete button + +// @FindBy(css = "#content > div > button") +// public WebElement addElement; +// public WebElement getaddElement(){ +// return addElement; +// } +// +// @FindBy(css = "#elements > button:nth-child(1)") +// public WebElement delete1; +// public WebElement getdelete1(){ +// return delete1; +// } +// +// @FindBy(css = "#elements > button:nth-child(2)") +// public WebElement delete2; +// public WebElement getdelete2(){ +// return delete2; +// } +// +// @FindBy(css = "#elements > button:nth-child(3)") +// public WebElement delete3; +// public WebElement getDelete3(){ +// return delete3; +// } + + @FindBy(xpath= "//div[@id='content']//button[.='Add Element']") + public WebElement addElement; + public WebElement getaddElement(){ + return addElement; + } + + @FindBy(xpath= "//div[@id='elements']/button[2]") + public WebElement delete1; + public WebElement getdelete1(){ + return delete1; + } + + @FindBy(xpath= "//div[@id='elements']/button[1]") + public WebElement delete2; + public WebElement getdelete2(){ + return delete2; + } + + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/Basic_auth.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/Basic_auth.java new file mode 100644 index 0000000..4f8e6bb --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/Basic_auth.java @@ -0,0 +1,26 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class Basic_auth extends BasePage { + + public Basic_auth(WebDriver driver){ + super(driver); + } + + //WebElement Header1 + @FindBy(css = "#content > div > h3") + public WebElement basicAuthWebElementHeader1; + public WebElement getBasicAuthWebElementHeader1(){ + return basicAuthWebElementHeader1; + } + //WebElement paragraph + @FindBy(css = "#content > div > p") + public WebElement basicAuthWebElementParagraph; + public WebElement getBasicAuthWebElementParagraph(){ + return basicAuthWebElementParagraph; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/BrokenImagePage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/BrokenImagePage.java new file mode 100644 index 0000000..b5db00e --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/BrokenImagePage.java @@ -0,0 +1,19 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class BrokenImagePage extends BasePage { + + public BrokenImagePage(WebDriver driver){ + super(driver); + } + //WebElement broken Image Validation + @FindBy(css = "#content > div > h3") + public WebElement header1; + public WebElement getHeader1(){ + return header1; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/ChallengingDOM.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/ChallengingDOM.java new file mode 100644 index 0000000..7292a4e --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/ChallengingDOM.java @@ -0,0 +1,8 @@ +package com.gits.herokuapp.Pages; + + +public class ChallengingDOM { + + + + } diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/CheckBoxesPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/CheckBoxesPage.java new file mode 100644 index 0000000..bbe105c --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/CheckBoxesPage.java @@ -0,0 +1,31 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class CheckBoxesPage extends BasePage { + + public CheckBoxesPage(WebDriver driver){ + super(driver); + } + //checkbox Header + @FindBy(css = "#content > div > h3") + public WebElement checkboxHeader; + public WebElement getCheckboxHeader(){ + return checkboxHeader; + } + + //Checkbox1 + @FindBy(css = "#checkboxes > input[type=checkbox]:nth-child(1)") + public WebElement checkBox1; + public WebElement getCheckBox1(){ + return checkBox1; + } + @FindBy(css = "#checkboxes > input[type=checkbox]:nth-child(3)") + public WebElement checkbox2; + public WebElement getCheckbox2(){ + return checkbox2; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/ContextMenuPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/ContextMenuPage.java new file mode 100644 index 0000000..c1ef6da --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/ContextMenuPage.java @@ -0,0 +1,38 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class ContextMenuPage extends BasePage { + public ContextMenuPage(WebDriver driver){ + super(driver); + } + + //ContextMenuHeader + @FindBy(css = "#content > div > h3") + public WebElement ContextMenuHeader; + public WebElement getContextMenuHeader(){ + return ContextMenuHeader; + } + + //ContextMenuParagraph1 + @FindBy(css = "#content > div > p:nth-child(2)") + public WebElement ContextMenuParagraph1; + public WebElement getContextMenuParagraph1(){ + return ContextMenuParagraph1; + } + //ContextMenuParagraph2 + @FindBy(css = "#content > div > p:nth-child(3)") + public WebElement ContextMenuParagraph2; + public WebElement getContextMenuParagraph2(){ + return ContextMenuParagraph2; + } + //Box + @FindBy(css = "[oncontextmenu]") + public WebElement box; + public WebElement getBox(){ + return box; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DigestAuth.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DigestAuth.java new file mode 100644 index 0000000..6b200a1 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DigestAuth.java @@ -0,0 +1,26 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class DigestAuth extends BasePage { + public DigestAuth(WebDriver driver) { + super(driver); + } + //header validation + @FindBy(xpath = "//div[@id='content']//h3[.='Digest Auth']") + public WebElement header; + public WebElement getHeader() { + return header; + } + + + //paragraph validation + @FindBy(xpath = "//div[@id='content']//h3[.='Digest Auth']") + public WebElement paragraph; + public WebElement getParagraph(){ + return paragraph; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DisapperingElements.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DisapperingElements.java new file mode 100644 index 0000000..617d13a --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DisapperingElements.java @@ -0,0 +1,48 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class DisapperingElements extends BasePage { + public DisapperingElements(WebDriver driver){ + super(driver); + } + //HeaderText + @FindBy(css = "#content > div > h3") + public WebElement disappearingElementsHeaderText; + public WebElement getDisappearingElementsHeaderText(){ + return disappearingElementsHeaderText; + } + //ParagraphText + @FindBy(css = "#content > div > p") + public WebElement disappearingElementsParagraphText; + public WebElement getDisappearingElementsParagraphText(){ + return disappearingElementsParagraphText; + } + //Home Tab + @FindBy(css = "#content > div > ul > li:nth-child(1) > a") + public WebElement homeTab; + public WebElement getHomeTab(){ + return homeTab; + } + //About Tab + @FindBy(css = "#content > div > ul > li:nth-child(2) > a") + public WebElement aboutTab; + public WebElement getAboutTab(){ + return aboutTab; + } + //Contact Us Tab + @FindBy(css = "#content > div > ul > li:nth-child(3) > a") + public WebElement contactUsTab; + public WebElement getContactUsTab(){ + return contactUsTab; + } + //Portfolio Tab + @FindBy(css = "#content > div > ul > li:nth-child(4) > a") + public WebElement portfolioTab; + public WebElement getPortfolioTab(){ + return portfolioTab; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/Drag_and_drop.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/Drag_and_drop.java new file mode 100644 index 0000000..fe20aa9 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/Drag_and_drop.java @@ -0,0 +1,19 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class Drag_and_drop extends BasePage { + public Drag_and_drop(WebDriver driver){ + super(driver); + } + + //Header Text + @FindBy(css = "#content > div > h3") + public WebElement dragAndDropHeaderText; + public WebElement getDragAndDropHeaderText(){ + return dragAndDropHeaderText; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DropDown.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DropDown.java new file mode 100644 index 0000000..fc6c3aa --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DropDown.java @@ -0,0 +1,40 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class DropDown extends BasePage { + public DropDown(WebDriver driver){ + super(driver); + } + + //HeaderText + @FindBy(css = "#content > div > h3") + public WebElement dropDownHeaderText; + public WebElement getDropDownHeaderText(){ + return dropDownHeaderText; + } + + //option + @FindBy(css = "#dropdown > option:nth-child(1)") + public WebElement dropDownListOption; + public WebElement getDropDownListOption(){ + return dropDownListOption; + } + + //Option1 + @FindBy(css = "#dropdown > option:nth-child(2)") + public WebElement dropDownListOption1; + public WebElement getDropDownListOption1(){ + return dropDownListOption1; + } + + //Option2 + @FindBy(css = "#dropdown > option:nth-child(3)") + public WebElement dropDownListOption2; + public WebElement getDropDownListOption2(){ + return dropDownListOption2; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DyanamicPages/DynamicContentPages.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DyanamicPages/DynamicContentPages.java new file mode 100644 index 0000000..3ea7364 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DyanamicPages/DynamicContentPages.java @@ -0,0 +1,33 @@ +package com.gits.herokuapp.Pages.DyanamicPages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class DynamicContentPages extends BasePage { + public DynamicContentPages(WebDriver driver){ + super(driver); + } + + //Header Text + @FindBy(css = "#content > div > h3") + public WebElement dynamicContentHeaderText; + public WebElement getDynamicContentHeaderText(){ + return dynamicContentHeaderText; + } + + //Paragraph1 + @FindBy(css = "#content > div > p:nth-child(2)") + public WebElement dynamicContentParagraphText1; + public WebElement getDynamicContentParagraphText1(){ + return dynamicContentParagraphText1; + } + + //click here button + @FindBy(css = "#content > div > p:nth-child(3) > a") + public WebElement dynamicContentClick; + public WebElement getDynamicContentClick(){ + return dynamicContentClick; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DyanamicPages/DynamicControlsPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DyanamicPages/DynamicControlsPage.java new file mode 100644 index 0000000..c3cd560 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/DyanamicPages/DynamicControlsPage.java @@ -0,0 +1,56 @@ +package com.gits.herokuapp.Pages.DyanamicPages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class DynamicControlsPage extends BasePage { + public DynamicControlsPage(WebDriver driver){ + super(driver); + } + + //Header + @FindBy(css = "#content > div.example > h4:nth-child(1)") + public WebElement dynamicControlHeader; + public WebElement getDynamicControlHeader(){ + return dynamicControlHeader; + } + //Paragraph + @FindBy(css = "#content > div.example > p") + public WebElement dynamicControlParagraph; + public WebElement getDynamicControlParagraph(){ + return dynamicControlParagraph; + } + //Remove button + @FindBy(css = "#checkbox-example > button") + public WebElement removeButton; + public WebElement getRemoveButton(){ + return removeButton; + } + //Add Button + @FindBy(css = "#checkbox-example > button") + public WebElement addButton; + public WebElement getAddButton(){ + return addButton; + } + //CheckBox click + @FindBy(css = "#checkbox > input[type=checkbox]") + public WebElement checkBoxClick; + public WebElement getCheckBoxClick(){ + return checkBoxClick; + } + + //Inputs field + @FindBy(css = "#input-example > input[type=text]") + public WebElement inputsField; + public WebElement getInputsField(){ + return inputsField; + } + //Enable button + @FindBy(css = "#input-example > button") + public WebElement enableButton; + public WebElement getEnableButton(){ + return enableButton; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FileDownloadPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FileDownloadPage.java new file mode 100644 index 0000000..b6d32ae --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FileDownloadPage.java @@ -0,0 +1,40 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class FileDownloadPage extends BasePage { + public FileDownloadPage(WebDriver driver){ + super(driver); + } + + //File Download Header + @FindBy(css = "#content > div > h3") + public WebElement fileDownloadHeaderText; + public WebElement getFileDownloadHeaderText(){ + return fileDownloadHeaderText; + } + + //Sample Txt_File + @FindBy(linkText = "test.txt") + public WebElement textFileDownload; + public WebElement getTextFileDownload(){ + return textFileDownload; + } + + //Csv_File + @FindBy(linkText = "location.xlsx") + public WebElement XlsxFileDownload; + public WebElement getXlsxFileDownload(){ + return XlsxFileDownload; + } + + //Csv file linkText + @FindBy(linkText = "logo.png") + public WebElement pngFileDownload; + public WebElement getPngFileDownload(){ + return pngFileDownload; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FileUploadPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FileUploadPage.java new file mode 100644 index 0000000..a84f855 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FileUploadPage.java @@ -0,0 +1,25 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class FileUploadPage extends BasePage { + public FileUploadPage(WebDriver driver){ + super(driver); + } + //Choose File Button + @FindBy(css = "input#file-upload") + public WebElement chooseFileButton; + public WebElement getChooseFileButton(){ + return chooseFileButton; + } + //Upload Button + @FindBy(id = "file-submit") + public WebElement uploadButton; + public WebElement getUploadButton(){ + return uploadButton; + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/ForgotPasswordPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/ForgotPasswordPage.java new file mode 100644 index 0000000..f1a4d16 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/ForgotPasswordPage.java @@ -0,0 +1,33 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class ForgotPasswordPage extends BasePage { + + public ForgotPasswordPage(WebDriver driver){ + super(driver); + } + + //Forgot Password Header + @FindBy(css = "#content > div > h2") + public WebElement forgotPasswordHeader; + public WebElement getForgotPasswordHeader(){ + return forgotPasswordHeader; + } + //EmailField + @FindBy(css = "#email") + public WebElement emailField; + public WebElement getEmailField(){ + return emailField; + } + + //passwordRetrieveButton + @FindBy(css = "#form_submit > i") + public WebElement passwordRetrieveButton; + public WebElement getPasswordRetrieveButton(){ + return passwordRetrieveButton; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FormAuthenticationValidate.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FormAuthenticationValidate.java new file mode 100644 index 0000000..6750abe --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FormAuthenticationValidate.java @@ -0,0 +1,41 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class FormAuthenticationValidate extends BasePage { + + public FormAuthenticationValidate(WebDriver driver) { + super(driver); + } + + //Enter valid username + @FindBy(css = "#username") + public WebElement userName; + public WebElement getUserName() { + return userName; + } + + //Enter invalid password + @FindBy(css = "#password") + public WebElement password; + public WebElement getPassword() { + return password; + } + + //click on login button + @FindBy(css = "#login > button > i") + public WebElement loginClick; + public WebElement getLoginClick() { + return loginClick; + } + + + + + + + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FramePage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FramePage.java new file mode 100644 index 0000000..4be8e59 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/FramePage.java @@ -0,0 +1,33 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class FramePage extends BasePage { + public FramePage(WebDriver driver){ + super(driver); + } + + //Nested Frames + @FindBy(linkText = "Nested Frames") + public WebElement nestedFramesText; + public WebElement getNestedFramesText(){ + return nestedFramesText; + } + + //iFrame CssSelector + @FindBy(css = "#content > div > ul > li:nth-child(2) > a") + public WebElement IFrames; + public WebElement getIFrames(){ + return IFrames; + } + + //iFrame + @FindBy(linkText = "iFrame") + public WebElement iFrame; + public WebElement getiFrame(){ + return iFrame; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/HorizontalSliderPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/HorizontalSliderPage.java new file mode 100644 index 0000000..3b73fa7 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/HorizontalSliderPage.java @@ -0,0 +1,30 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class HorizontalSliderPage extends BasePage { + public HorizontalSliderPage(WebDriver driver){ + super(driver); + } + //Header + @FindBy(css = "#content > div > h3") + public WebElement horizontalSliderHeader; + public WebElement getHorizontalSliderHeader(){ + return horizontalSliderHeader; + } + //SubHeader + @FindBy(css = "#content > div > h4") + public WebElement horizontalSliderSubHeader; + public WebElement getHorizontalSliderSubHeader(){ + return horizontalSliderSubHeader; + } + //Slider + @FindBy(css = "#content > div > div > input[type=range]") + public WebElement slider; + public WebElement getSlider(){ + return slider; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/HoverPages.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/HoverPages.java new file mode 100644 index 0000000..587a224 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/HoverPages.java @@ -0,0 +1,84 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class HoverPages extends BasePage { + public HoverPages(WebDriver driver) { + super(driver); + } + + //ImageOne + @FindBy(css = "#content > div > div:nth-child(3) > img") + public WebElement imageOne; + + public WebElement getImageOne() { + return imageOne; + } + + //Name User One + @FindBy(css = "#content > div > div:nth-child(3) > div > h5") + public WebElement nameUserOne; + + public WebElement getNameUserOne() { + return nameUserOne; + } + + //view Profile One + @FindBy(css = "#content > div > div:nth-child(3) > div > a") + public WebElement viewProfileOne; + + public WebElement getViewProfileOne() { + return viewProfileOne; + } + + //ImageTwo + @FindBy(css = "#content > div > div:nth-child(4) > img") + public WebElement imageTwo; + + public WebElement getImageTwo() { + return imageTwo; + } + + //Name User Two + @FindBy(css = "#content > div > div:nth-child(4) > div > h5") + public WebElement nameUserTwo; + + public WebElement getNameUserTwo() { + return nameUserTwo; + } + + //View Profile Two + @FindBy(css = "#content > div > div:nth-child(4) > div > a") + public WebElement viewProfileTwo; + + public WebElement getViewProfileTwo() { + return viewProfileTwo; + } + + //Image three + @FindBy(css = "#content > div > div:nth-child(5) > img") + public WebElement imageThree; + + public WebElement getImageThree() { + return imageThree; + } + + //Name User Three + @FindBy(css = "#content > div > div:nth-child(5) > div > h5") + public WebElement nameUserThree; + + public WebElement getNameUserThree() { + return nameUserThree; + } + + //View Profile Three + @FindBy(css = "#content > div > div:nth-child(5) > div > a") + public WebElement viewProfileThree; + + public WebElement getViewProfileThree() { + return viewProfileThree; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/InfiniteScrollPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/InfiniteScrollPage.java new file mode 100644 index 0000000..9c6db3a --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/InfiniteScrollPage.java @@ -0,0 +1,18 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class InfiniteScrollPage extends BasePage { + public InfiniteScrollPage(WebDriver driver){ + super(driver); + } + //Header + @FindBy(css = "#content > div > h3") + public WebElement header; + public WebElement getHeader(){ + return header; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/InputsPages.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/InputsPages.java new file mode 100644 index 0000000..10e5183 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/InputsPages.java @@ -0,0 +1,30 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class InputsPages extends BasePage { + public InputsPages(WebDriver driver){ + super(driver); + } + //Header + @FindBy(css = "#content > div > div > h3") + public WebElement header; + public WebElement getHeader(){ + return header; + } + //Paragraph + @FindBy(css = "#content > div > div > div > p") + public WebElement paragraph; + public WebElement getParagraph(){ + return paragraph; + } + //InputField + @FindBy(css = "#content > div > div > div > input[type=number]") + public WebElement inputField; + public WebElement getInputField(){ + return inputField; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/JavaScriptAlertsPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/JavaScriptAlertsPage.java new file mode 100644 index 0000000..4d11968 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/JavaScriptAlertsPage.java @@ -0,0 +1,50 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class JavaScriptAlertsPage extends BasePage { + public JavaScriptAlertsPage(WebDriver driver){ + super(driver); + } + + //Header + @FindBy(css = "#content > div > h3") + public WebElement header; + public WebElement getHeader(){ + return header; + } + //Paragraph + @FindBy(css = "#content > div > p:nth-child(2)") + public WebElement paragraph; + public WebElement getParagraph(){ + return paragraph; + } + //ClickForJSAlert + @FindBy(css = "#content > div > ul > li:nth-child(1) > button") + public WebElement clickForJSAlert; + public WebElement getClickForJSAlert(){ + return clickForJSAlert; + } + //ClickForJSConfirm + @FindBy(css = "#content > div > ul > li:nth-child(2) > button") + public WebElement clickForJSConfirm; + public WebElement getClickForJSConfirm(){ + return clickForJSConfirm; + } + //ClickForJSPrompt + @FindBy(css = "#content > div > ul > li:nth-child(3) > button") + public WebElement clickForJSPrompt; + public WebElement getClickForJSPrompt(){ + return clickForJSPrompt; + } + //ResultText + @FindBy(css = "#result") + public WebElement resultText; + public WebElement getResultText(){ + return resultText; + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/MultipleWindow/MultipleWindowsPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/MultipleWindow/MultipleWindowsPage.java new file mode 100644 index 0000000..e9cdc36 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/MultipleWindow/MultipleWindowsPage.java @@ -0,0 +1,24 @@ +package com.gits.herokuapp.Pages.MultipleWindow; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class MultipleWindowsPage extends BasePage { + public MultipleWindowsPage(WebDriver driver){ + super(driver); + } + //Header + @FindBy(css = "#content > div > h3") + public WebElement header; + public WebElement getHeader(){ + return header; + } + //Click Here + @FindBy(css = "#content > div > a") + public WebElement clickHere; + public WebElement getClickHere(){ + return clickHere; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/MultipleWindow/NewWindowsPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/MultipleWindow/NewWindowsPage.java new file mode 100644 index 0000000..466ed0c --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/MultipleWindow/NewWindowsPage.java @@ -0,0 +1,18 @@ +package com.gits.herokuapp.Pages.MultipleWindow; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class NewWindowsPage extends BasePage { + public NewWindowsPage(WebDriver driver){ + super(driver); + } + //New Header + @FindBy(css = "body > div > h3") + public WebElement newHeader; + public WebElement getNewHeader(){ + return newHeader; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/NotificationMassagesPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/NotificationMassagesPage.java new file mode 100644 index 0000000..85eee43 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/NotificationMassagesPage.java @@ -0,0 +1,26 @@ +package com.gits.herokuapp.Pages; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class NotificationMassagesPage extends BasePage { + public NotificationMassagesPage(WebDriver driver){ + super(driver); + } + + + //ClickHere + @FindBy(css = "#content > div > p > a") + public WebElement clickHere; + public WebElement getClickHere(){ + return clickHere; + } + //Flash Alert + @FindBy(css = "#flash") + public WebElement flashAlert; + public WebElement getFlashAlert(){ + return flashAlert; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/RedirectLink/RedirectLinkPage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/RedirectLink/RedirectLinkPage.java new file mode 100644 index 0000000..8445694 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/RedirectLink/RedirectLinkPage.java @@ -0,0 +1,30 @@ +package com.gits.herokuapp.Pages.RedirectLink; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class RedirectLinkPage extends BasePage { + public RedirectLinkPage(WebDriver driver){ + super(driver); + } + //Header1 + @FindBy(css = "#content > div > h3") + public WebElement header1; + public WebElement getHeader1(){ + return header1; + } + //Paragraph1 + @FindBy(css = "#content > div > p") + public WebElement paragraph1; + public WebElement getParagraph1(){ + return paragraph1; + } + //Click Here + @FindBy(css = "#redirect") + public WebElement clickHere; + public WebElement getClickHere(){ + return clickHere; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/RedirectLink/StatusCodePage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/RedirectLink/StatusCodePage.java new file mode 100644 index 0000000..22bc22c --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Pages/RedirectLink/StatusCodePage.java @@ -0,0 +1,55 @@ +package com.gits.herokuapp.Pages.RedirectLink; + +import com.gits.herokuapp.Configuaration.BasePage; +import org.openqa.selenium.WebDriver; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; + +public class StatusCodePage extends + BasePage { + public StatusCodePage(WebDriver driver){ + super(driver); + } + //Header1 + @FindBy(css = "#content > div > h3") + public WebElement header1; + public WebElement getHeader1(){ + return header1; + } + //Paragraph1 + @FindBy(css = "#content > div > p:nth-child(2)") + public WebElement paragraph1; + public WebElement getParagraph1(){ + return paragraph1; + } + //RedirectLink 200 + @FindBy(css = "#content > div > ul > li:nth-child(1) > a") + public WebElement redirectLink200; + public WebElement getRedirectLink200(){ + return redirectLink200; + } + //RedirectLink 301 + @FindBy(css = "#content > div > ul > li:nth-child(2) > a") + public WebElement redirectLink301; + public WebElement getRedirectLink301(){ + return redirectLink301; + } + //RedirectLink 404 + @FindBy(css = "#content > div > ul > li:nth-child(3) > a") + public WebElement redirectLink404; + public WebElement getRedirectLink404(){ + return redirectLink404; + } + //RedirectLink 500 + @FindBy(css = "#content > div > ul > li:nth-child(4) > a") + public WebElement redirectLink500; + public WebElement getRedirectLink500(){ + return redirectLink500; + } + //Click Here For Every Corresponding Status Code Page + @FindBy(css = "#content > div > p:nth-child(2) > a") + public WebElement clickHere; + public WebElement getClickHere(){ + return clickHere; + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/ABTestingValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/ABTestingValidation.java new file mode 100644 index 0000000..1744655 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/ABTestingValidation.java @@ -0,0 +1,85 @@ +package com.gits.herokuapp.TestCases; + + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.AbTesting; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class ABTestingValidation extends BaseClass { + + @Test + public void ABTestingValidation() { + + LandingPage lp = new LandingPage(driver); + AbTesting at = new AbTesting(driver); + + //HOME URL Validation + String baseLink = driver.getCurrentUrl(); + System.out.println("Given " + baseLink); + Assert.assertEquals(baseLink, Data.BASE_URL); + System.out.println("Home URL is visible"); + sleepTime(1000); + + //click on AB Testing Button + if (lp.getABTesting().isDisplayed()) { + String abTesting = lp.getABTesting().getText(); + Assert.assertEquals(Data.AB_TESTING, abTesting); + } else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + lp.getABTesting().click(); + sleepTime(1000); + + // Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given " + link); + Assert.assertEquals(link, Data.BASE_URL + Data.AB_TEST_LINK); + System.out.println("Link is validate"); + sleepTime(2000); + + //Header Validation + if (at.getabTestingVariation1().isDisplayed()) { + String header1 = at.getabTestingVariation1().getText(); + Assert.assertEquals(Data.AB_TEST_VARIATION, header1); + } else if (at.getAbTestControl().isDisplayed()) { + String header2 = at.abTestControl.getText(); + Assert.assertEquals(Data.AB_TEST_CONTROL, header2); + } else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + sleepTime(1000); + + //Paragraph Validation + if (at.getAbTestingParagraph().isDisplayed()){ + String actualParagraph = at.getAbTestingParagraph().getText(); + Assert.assertEquals(actualParagraph ,Data.AB_TEST_PARAGRAPH); + } else { + System.out.println("NO PARAGRAPH IS VISIBLE"); + } + + + driver.navigate().back(); + sleepTime(5000); + + + // another way to validate ab testing +// //validate Header1 massage +// at.getabTestingVariation1().isDisplayed(); +// String actualHeader1Massage = at.getabTestingVariation1().getText(); +// String expectedHeader1Massage = "A/B Test Variation 1"; +// Assert.assertEquals(actualHeader1Massage , expectedHeader1Massage); +// +// //validate paragraph massage +// at.getAbTestingParagraph().isDisplayed(); +// String actualParagraphMassage = at.getAbTestingParagraph().getText(); +// String expectedParagraphMassage = "Also known as split testing. This is a way in which businesses are able to simultaneously test and learn different versions of a page to see which text and/or functionality works best towards a desired outcome (e.g. a user action such as a click-through)."; +// Assert.assertEquals(actualParagraphMassage , expectedParagraphMassage); + + + } +} + + diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/AddRemoveElementsValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/AddRemoveElementsValidation.java new file mode 100644 index 0000000..fbe3bac --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/AddRemoveElementsValidation.java @@ -0,0 +1,74 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.AddRemoveElements; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class AddRemoveElementsValidation extends BaseClass { + + @Test + public void addRemoveElements () { + + + LandingPage lp = new LandingPage(driver); + AddRemoveElements are =new AddRemoveElements(driver); + + //HOME URL Validation + String baseLink = driver.getCurrentUrl(); + System.out.println("Given "+baseLink); + Assert.assertEquals(baseLink, Data.BASE_URL); + System.out.println("Home URL is valid"); + sleepTime(1000); + + //click on Add Remove Element button + sleepTime(2000); + if (lp.getAddRemoveElement().isDisplayed()) + { + String addRemoveElementsText =lp.getAddRemoveElement().getText(); + Assert.assertTrue(true, addRemoveElementsText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + lp.getAddRemoveElement().click(); + + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.ADD_REMOVE_ELEMENT_LINK); + System.out.println("Link is validate"); + sleepTime(1000); + + //Header Validation + if (are.getaddRemoveElementsHeader().isDisplayed()) + { + String addRmvHeader= are.getaddRemoveElementsHeader().getText(); + Assert.assertTrue(true,Data.HEADER); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + sleepTime(1000); + are.getaddElement().click(); + sleepTime(1000); + are.getaddElement().click(); + sleepTime(1000); + are.getdelete1().click(); + sleepTime(1000); + are.getdelete2().click(); + sleepTime(1000); + + + + //back to home + driver.navigate().back(); + sleepTime(2000); + + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/BasicAuth.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/BasicAuth.java new file mode 100644 index 0000000..86a7137 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/BasicAuth.java @@ -0,0 +1,64 @@ +package com.gits.herokuapp.TestCases; + + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.Basic_auth; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class BasicAuth extends BaseClass { + @Test + public void basicAuth () { + LandingPage lp = new LandingPage(driver); + Basic_auth bauth =new Basic_auth(driver); + + //HOME URL Validation + String baseLink = driver.getCurrentUrl(); + System.out.println("Given "+baseLink); + Assert.assertEquals(baseLink, Data.BASE_URL); + System.out.println("Home URL is validate"); + sleepTime(2000); + + //BasicAuth Text validation in Base page + if(lp.getBasicAuthentication().isDisplayed()){ + String basicAuthText= lp.getBasicAuthentication().getText(); + Assert.assertTrue(true,basicAuthText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + lp.getBasicAuthentication().click(); + sleepTime(1000); + + //Value Pass On input Field login popup + driver.get("https://admin:admin@the-internet.herokuapp.com/basic_auth"); + //// ... Get the URL + //driver.get("https://:@www.example.com/index.html") + sleepTime(1000); + + //Header Validation + if (bauth.getBasicAuthWebElementHeader1().isDisplayed()){ + String basicAuthHeaderText = bauth.getBasicAuthWebElementHeader1().getText(); + Assert.assertTrue(true,basicAuthHeaderText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + + //Paragraph Validation + + if (bauth.getBasicAuthWebElementParagraph().isDisplayed()){ + String basicAuthParagraphText = bauth.getBasicAuthWebElementParagraph().getText(); + Assert.assertTrue(true,basicAuthParagraphText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + sleepTime(1000); + driver.navigate().back(); + sleepTime(2000); + System.out.println("Test Run Successfully "); + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/BrokenImage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/BrokenImage.java new file mode 100644 index 0000000..f36c71d --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/BrokenImage.java @@ -0,0 +1,68 @@ +package com.gits.herokuapp.TestCases; + + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.BrokenImagePage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + + +public class BrokenImage extends BaseClass { + + @Test + public void BrokenImage(){ + + LandingPage lp = new LandingPage(driver); + BrokenImagePage bip = new BrokenImagePage (driver); + + //Click on Broken Image Page + lp.getBrokenImage().click(); + sleepTime(2000); + + //URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.BROKEN_IMAGE_LINK); + System.out.println("Link is valid"); + sleepTime(1000); + + + //Header Validation + if(bip.getHeader1().isDisplayed()){ + String header =bip.getHeader1().getText() ; + Assert.assertEquals(header, Data.BROKEN_IMAGE_HEADER); + System.out.println("Header Text is valid"); + + } + else{ + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + sleepTime(2000); + + + // TC-3 : Broken Image Validation Including (Http response , Broken Image Link) +// List elementList = driver.findElements(By.tagName("img")); +// for (int i = 0; i < elementList.size(); i++){ +// +// response = RestAssure.given().contentType("application/json") +// .get(elementList.get(i).getAttribute("src")); +// +// System.out.println("HTTP Response Is: " + response.getStatusCode()); +// +// if ( elementList.get(i).getAttribute("naturalWidth").equals("0")){ +// System.out.println( elementList.get(i).getAttribute("src") + " Is Broken." ); +// } +// +// else{ +// System.out.println( elementList.get(i).getAttribute("src") + " Is Not Broken." ); +// } +// } +// +// driver.navigate().back(); +// sleepTime(2000); + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/CheckboxesValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/CheckboxesValidation.java new file mode 100644 index 0000000..1706114 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/CheckboxesValidation.java @@ -0,0 +1,72 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.CheckBoxesPage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class CheckboxesValidation extends BaseClass { + + @Test + public void checkboxes (){ + + LandingPage lp = new LandingPage(driver); + CheckBoxesPage cbp =new CheckBoxesPage(driver); + + //HOME URL Validation + String baseLink = driver.getCurrentUrl(); + System.out.println("Given "+baseLink); + Assert.assertEquals(baseLink, Data.BASE_URL); + System.out.println("Home URL is valid"); + sleepTime(1000); + + //Header Validation and click on checkboxes button + if(lp.getCheckBoxes().isDisplayed()){ + String checkBoxText= lp.getCheckBoxes().getText(); + Assert.assertTrue(true,checkBoxText); + } + lp.getCheckBoxes().click(); + + + //Checkbox 1 selection and Checkbox text validation + if(cbp.getCheckBox1().isSelected()) + { + System.out.println(Data.POSITIVE_MASSAGE+ Data.CHECK_BOX1_SELECTED); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + cbp.getCheckbox2().click(); + + + //Checkbox 2 selection and Checkbox text validation + if(cbp.getCheckbox2().isSelected()) + { + System.out.println(Data.POSITIVE_MASSAGE+ Data.CHECK_BOX2_SELECTED); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + sleepTime( 1000); + + + + //URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.CHECK_BOX_LINK); + System.out.println("Link is valid"); + sleepTime(1000); + + + sleepTime(1000); + cbp.getCheckBox1().click(); + sleepTime(1000); + cbp.getCheckbox2().click(); + sleepTime(1000); + driver.navigate().to(Data.BASE_URL); + sleepTime(1000); + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/ContextMenuValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/ContextMenuValidation.java new file mode 100644 index 0000000..4f9d37a --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/ContextMenuValidation.java @@ -0,0 +1,98 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.ContextMenuPage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.interactions.Actions; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class ContextMenuValidation extends BaseClass { + + @Test + public void contextMenu(){ + + // instance create of reference variable + LandingPage lp = new LandingPage(driver); + ContextMenuPage cmp =new ContextMenuPage(driver); + + //HOME URL Validation + String baseLink = driver.getCurrentUrl(); + System.out.println("Given "+baseLink); + Assert.assertEquals(baseLink, Data.BASE_URL); + System.out.println("Home URL is valid"); + sleepTime(1000); + + //Context Menu Text validation in Base page + if(lp.getContextMenu().isDisplayed()){ + String contextMenuText= lp.getContextMenu().getText(); + Assert.assertTrue(true,contextMenuText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + + lp.getContextMenu().click(); + sleepTime(1000); + + //Header Validation + + if(cmp.getContextMenuHeader().isDisplayed()){ + String contextMenuHeaderText= cmp.getContextMenuHeader().getText(); + Assert.assertTrue(true,contextMenuHeaderText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + + // Paragraph1 Validation + + if(cmp.getContextMenuParagraph1().isDisplayed()){ + String contextMenuParagraph1Text= cmp.getContextMenuParagraph1().getText(); + Assert.assertTrue(true,contextMenuParagraph1Text); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + + //Paragraph2 Validation + + if(cmp.getContextMenuParagraph2().isDisplayed()){ + String contextMenuParagraph2Text= cmp.getContextMenuParagraph2().getText(); + Assert.assertTrue(true,contextMenuParagraph2Text); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + + //Right Click + Actions actions = new Actions(driver); + actions.contextClick(cmp.getBox()).perform(); + + //get box right click perform +// Actions action= new Actions(driver); +// action.contextClick(productLink).build().perform(); + //another way +// Actions action = new Actions(driver).contextClick(element); +// action.build().perform(); + + //Accept Alert + System.out.println(driver.switchTo().alert().getText()); + sleepTime(2000); + + //Accept the popup Alert + driver.switchTo().alert().accept(); + //for dismiss the popup alert +// driver.switchTo().alert().dismiss(); + + + System.out.println(" Alert Accepted"); + sleepTime(1000); + driver.navigate().back(); + sleepTime(1000); + + + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DigestAuthentication.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DigestAuthentication.java new file mode 100644 index 0000000..0fa4414 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DigestAuthentication.java @@ -0,0 +1,65 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.DigestAuth; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class DigestAuthentication extends BaseClass { + @Test + public void digestAuthentication(){ + + LandingPage lp = new LandingPage(driver); + DigestAuth dauth = new DigestAuth(driver); + + + //HOME URL Validation + String baseLink = driver.getCurrentUrl(); + System.out.println("Given "+baseLink); + Assert.assertEquals(baseLink, Data.BASE_URL); + System.out.println("Home URL is valid"); + sleepTime(2000); + + //DigestAuthentication Text validation in Base page + if(lp.getDigestAuthentication().isDisplayed()){ + String digestAuthText= lp.getDigestAuthentication().getText(); + Assert.assertTrue(true,digestAuthText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + lp.getDigestAuthentication().click(); + sleepTime(1000); + + //Value Pass On input Field login popup + driver.get("http://admin:admin@the-internet.herokuapp.com/digest_auth"); + //// ... Get the URL + //driver.get("https://:@www.example.com/index.html") + sleepTime(2000); + + //Header Validation + if(dauth.getHeader().isDisplayed()){ + String headerText= dauth.getHeader().getText(); + Assert.assertTrue(true,headerText); + System.out.println(Data.POSITIVE_MASSAGE); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + sleepTime(2000); + + //Paragraph Validation + if(dauth.getParagraph().isDisplayed()){ + String paragraphText= dauth.getParagraph().getText(); + Assert.assertTrue(true,paragraphText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + sleepTime(2000); + driver.navigate().back(); + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DisappearingElementsValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DisappearingElementsValidation.java new file mode 100644 index 0000000..ee2b5ab --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DisappearingElementsValidation.java @@ -0,0 +1,76 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.DisapperingElements; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class DisappearingElementsValidation extends BaseClass { + @Test + public void disappearingElementsValidation(){ + LandingPage lp = new LandingPage(driver); + DisapperingElements de = new DisapperingElements(driver); + + //HOME URL Validation + String baseLink = driver.getCurrentUrl(); + System.out.println("Given "+baseLink); + Assert.assertEquals(baseLink, Data.BASE_URL); + System.out.println("Home URL is valid"); + sleepTime(1000); + + //Header Validation and click perform + if(lp.getDisappearingElement().isDisplayed()){ + String disappearingElementText= lp.getDisappearingElement().getText(); + Assert.assertTrue(true,disappearingElementText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + lp.getDisappearingElement().click(); + sleepTime(2000); + + //Corresponding Page URL Validation + String disappearingElementBaseUrl = driver.getCurrentUrl(); + System.out.println(disappearingElementBaseUrl); + Assert.assertEquals(disappearingElementBaseUrl, Data.BASE_URL+Data.DISAPPEARING_ELEMENTS_LINK); + + //headerValidation + if(de.getDisappearingElementsHeaderText().isDisplayed()){ + String disappearingElementHeaderText= de.getDisappearingElementsHeaderText().getText(); + Assert.assertTrue(true,disappearingElementHeaderText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + //Paragraph Validation + sleepTime(2000); + if(de.getDisappearingElementsParagraphText().isDisplayed()){ + String disappearingElementParagraphText= de.getDisappearingElementsParagraphText().getText(); + Assert.assertTrue(true,disappearingElementParagraphText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + de.getHomeTab().click(); + sleepTime(2000); + driver.navigate().back(); + sleepTime(2000); + de.getAboutTab().click(); + sleepTime(2000); + driver.navigate().back(); + sleepTime(2000); + de.getContactUsTab().click(); + sleepTime(2000); + driver.navigate().back(); + sleepTime(2000); + de.getPortfolioTab().click(); + sleepTime(2000); + driver.navigate().back(); + sleepTime(2000); + driver.navigate().back(); + sleepTime(2000); + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DragAndDropValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DragAndDropValidation.java new file mode 100644 index 0000000..bd93020 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DragAndDropValidation.java @@ -0,0 +1,89 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.Drag_and_drop; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.interactions.Actions; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class DragAndDropValidation extends BaseClass { + + @Test + public void dragAndDrop(){ + + LandingPage lp = new LandingPage(driver); + Drag_and_drop dap =new Drag_and_drop(driver); + + //BasicAuth Text validation in Base page + if(lp.getDragAndDrop().isDisplayed()){ + String dragAndDropText = lp.getDragAndDrop().getText(); + Assert.assertTrue(true,dragAndDropText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + lp.getDragAndDrop().click(); + sleepTime(1000); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println(link); + Assert.assertEquals(link, Data.BASE_URL+Data.DRAG_AND_DROP_LINK); + System.out.println("Link is Valid"); + + //Header Validation + if(dap.getDragAndDropHeaderText().isDisplayed()){ + String dragAndDropHeaderText = dap.getDragAndDropHeaderText().getText(); + Assert.assertTrue(true,dragAndDropHeaderText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + sleepTime(1000); + + //Mouse hover Doesn't work properly + // Locating the Main Menu (Parent element or From Element) + WebElement mainmenu = driver.findElement(By.xpath("/html//div[@id='column-a']")); + //WebElement mainmenu = driver.findElement(By.cssSelector("#column-a")); + + //Instantiating Actions class + Actions act = new Actions(driver); + + //Hovering on main menu + act.moveToElement(mainmenu); + sleepTime(1000); + + // Locating the element from Sub Menu or to manu + WebElement submenu = driver.findElement(By.xpath("/html//div[@id='column-b']")); + //WebElement submenu = driver.findElement(By.cssSelector("#column-b")); + + //To mouseover on sub menu + act.moveToElement(submenu); + sleepTime(1000); + + //build()- used to compile all the actions into a single step + act.dragAndDrop(mainmenu,submenu).build().perform(); + sleepTime(2000); + + driver.navigate().back(); + sleepTime(1000); + + +// //TC-4 Mouse Hover Validation +// WebElement from = driver.findElement(By.xpath("/html//div[@id='column-a']")); +// WebElement to = driver.findElement(By.xpath("/html//div[@id='column-b']")); +// +// //Drag And Drop Activity Doesn't Work properly +// Actions act=new Actions(driver); +// act.dragAndDrop(from,to).build().perform(); +// sleepTime(3000); +// driver.navigate().back(); +// sleepTime(3000); + + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DropDownValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DropDownValidation.java new file mode 100644 index 0000000..c27f533 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DropDownValidation.java @@ -0,0 +1,136 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.DropDown; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.List; + +public class DropDownValidation extends BaseClass { + @Test + public void dropDown(){ + LandingPage lp = new LandingPage(driver); + DropDown dd = new DropDown(driver); + + //HOME URL Validation + String baseLink = driver.getCurrentUrl(); + System.out.println("Given "+baseLink); + Assert.assertEquals(baseLink, Data.BASE_URL); + System.out.println("Home URL is valid"); + sleepTime(1000); + + //DropDown Text validation in Base page + if(lp.getDropDown().isDisplayed()){ + String dropDownText = lp.getDropDown().getText(); + Assert.assertTrue(true,dropDownText); + + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + lp.getDropDown().click(); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.DROP_DOWN_LINK); + System.out.println("Link is valid"); + sleepTime(1000); + + //Header Validation + if(dd.getDropDownHeaderText().isDisplayed()){ + String header =dd.getDropDownHeaderText().getText() ; + Assert.assertTrue(true,header); + System.out.println("Header is validate"); + + } + else{ + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + + //DropDown Validation Using Loop + driver.findElement(By.xpath("//*[@id=\"dropdown\"]")).click(); + sleepTime(3000); + + List allOptions = driver.findElements(By.cssSelector("select option")); + + String option = "Highest to lowest"; + + // Iterate the list using for loop + + for (int i = 0; i < allOptions.size(); i++) { + + if (allOptions.get(i).getText().contains(option)) { + + allOptions.get(i).click(); + sleepTime(5000); + break;}} + + driver.navigate().back(); + sleepTime(1000); + + + + +// //Click on DropDown List Option +// dd.getDropDownListOption().click(); +// sleepTime(1000); +// +// //Click on the list and Select Option 1 +// dd.getDropDownListOption1().click(); +// sleepTime(2000); +// +// //Drop Down option Text Validation +// if(dd.getDropDownListOption1().isDisplayed()){ +// String dropDownList1Text = dd.getDropDownListOption1().getText(); +// System.out.println("Selected :"+Data.DROP_DOWN_TEXT_OPTION1 ); +// Assert.assertEquals(dropDownList1Text,Data.DROP_DOWN_TEXT_OPTION1); +// } +// else { +// System.out.println(Data.NEGATIVE_ERROR_MASSAGE); +// } +// dd.getDropDownListOption().click(); +// sleepTime(1000); +// +// //Click on the list and select option 2 +// dd.getDropDownListOption2().click(); +// sleepTime(1000); +// +// //Drop Down Option2 Text Validation +// if(dd.getDropDownListOption2().isDisplayed()){ +// String dropDownList2Text = dd.getDropDownListOption2().getText(); +// System.out.println("Selected :"+Data.DROP_DOWN_TEXT_OPTION2 ); +// Assert.assertEquals(dropDownList2Text,Data.DROP_DOWN_TEXT_OPTION2); +// } +// else { +// System.out.println(Data.NEGATIVE_ERROR_MASSAGE); +// } +// sleepTime(1000); +// dd.getDropDownListOption().click(); +// sleepTime(1000); +// +// driver.navigate().back(); +// sleepTime(1000); + + + +// // Using Array for creating DropDown +// String[] array={ Data.DROP_DOWN_TEXT_OPTION1,Data.DROP_DOWN_TEXT_OPTION2}; +// // System.out.println("List Of Dropdown Element"+ Arrays.toString(array)); +// // declaring List +// List list=new ArrayList(); +// for(String lang:array){ +// list.add(lang); +// } +// System.out.println("List Of Dropdown Element: "+list); + +// driver.navigate().back(); +// sleepTime(1000); + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DynamicPageValidation/DynamicContentValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DynamicPageValidation/DynamicContentValidation.java new file mode 100644 index 0000000..b8571a4 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DynamicPageValidation/DynamicContentValidation.java @@ -0,0 +1,64 @@ +package com.gits.herokuapp.TestCases.DynamicPageValidation; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.DyanamicPages.DynamicContentPages; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.List; + +public class DynamicContentValidation extends BaseClass { + @Test + public void dynamicContentValidation(){ + + LandingPage lp = new LandingPage(driver); + DynamicContentPages dcp =new DynamicContentPages(driver); + + //HOME URL Validation + String baseLink = driver.getCurrentUrl(); + System.out.println("Given "+baseLink); + Assert.assertEquals(baseLink, Data.BASE_URL); + System.out.println("Home URL is valid"); + sleepTime(2000); + + //Home URL Header Validation + if(lp.getDynamicContent().isDisplayed()){ + String dynamicContentText = lp.getDynamicContent().getText(); + Assert.assertTrue(true,dynamicContentText); + System.out.println("Header is valid"); + + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + lp.getDynamicContent().click(); + + // URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.DYNAMIC_CONTENT_LINK); + System.out.println("Link is validate"); + sleepTime(2000); + + //Click here button + dcp.getDynamicContentClick().click(); + sleepTime(2000); + + //Row count + List row = driver.findElements(By.className("row")); + int numberOfRows = row.size(); + System.out.println("Total rows : " + numberOfRows); + + String beforeXpath = "/html//div[@id='content']/div/div[@class='row']/div[@id='content']/div["; + String afterXpath = "]"; + + driver.navigate().back(); + sleepTime(1000); + // //*[@id="content"]/div[1]/div[1] + ///html//div[@id='content']/div/div[@class='row']/div[@id='content']/div[1]/div[2] + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DynamicPageValidation/DynamicControlsValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DynamicPageValidation/DynamicControlsValidation.java new file mode 100644 index 0000000..4a16916 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/DynamicPageValidation/DynamicControlsValidation.java @@ -0,0 +1,88 @@ +package com.gits.herokuapp.TestCases.DynamicPageValidation; + + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.DyanamicPages.DynamicControlsPage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class DynamicControlsValidation extends BaseClass { + @Test + + public void dynamicControlValidation() + { + LandingPage lp = new LandingPage(driver); + DynamicControlsPage dcp =new DynamicControlsPage(driver); + + //HOME URL Validation + String baseLink = driver.getCurrentUrl(); + System.out.println("Given "+baseLink); + Assert.assertEquals(baseLink, Data.BASE_URL); + System.out.println("Home URL is validated"); + sleepTime(2000); + + //DynamicControl Text validation in Base page + if(lp.getDynamicControls().isDisplayed()){ + String dynamicControlText = lp.getDynamicControls().getText(); + Assert.assertTrue(true,dynamicControlText); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + + //click on Dynamic controls button + lp.getDynamicControls().click(); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.DYNAMIC_CONTROL_LINK); + System.out.println("Link is validated"); + sleepTime(2000); + + //Header Validation + if(dcp.getDynamicControlHeader().isDisplayed()){ + String header =dcp.getDynamicControlHeader().getText() ; + Assert.assertTrue(true,header); + System.out.println("Header Text is valid"); + + } + else{ + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + sleepTime(3000); + + //Paragraph text Validation + if(dcp. getDynamicControlParagraph().isDisplayed()){ + String paragraph =dcp.getDynamicControlParagraph().getText() ; + Assert.assertTrue(true,paragraph); + System.out.println("Paragraph Text is valid"); + + } + else{ + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + sleepTime(3000); + + dcp.getCheckBoxClick().click(); + sleepTime(2000); + dcp.getRemoveButton().click(); + sleepTime(3000); + dcp.getAddButton().click(); + sleepTime(3000); + dcp.getEnableButton().click(); + sleepTime(3000); + dcp.getInputsField().sendKeys("Subroto"); + sleepTime(2000); + dcp.getEnableButton().click(); + sleepTime(2000); + + + driver.navigate().back(); + sleepTime(3000); + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FileDownloadValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FileDownloadValidation.java new file mode 100644 index 0000000..f005b7a --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FileDownloadValidation.java @@ -0,0 +1,86 @@ +package com.gits.herokuapp.TestCases; + + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.FileDownloadPage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.awt.*; +import java.awt.event.KeyEvent; +import java.io.File; + +public class FileDownloadValidation extends BaseClass { + @Test + public void FileDownloadValidation() throws AWTException { + + LandingPage lp = new LandingPage(driver); + FileDownloadPage fdp = new FileDownloadPage(driver); + + //Click On FileDownLoad URL + lp.getFileDownLoad().click(); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.FILE_DOWNLOAD_LINK); + System.out.println("Link is valid"); + sleepTime(2000); + + //File Download Header Validation + if (fdp.getFileDownloadHeaderText().isDisplayed()){ + String fileDownLoadHeader = fdp.getFileDownloadHeaderText().getText(); + Assert.assertTrue(true, fileDownLoadHeader); + System.out.println("Header Text is Valid"); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + + +// WebElement fileDownload = driver.findElement(By.linkText("sample.txt")); +// fileDownload.click(); +// fdp.getTextFileDownload().click(); +// sleepTime(3000); +// fdp.getXlsxFileDownload().click(); +// sleepTime(1000); + fdp.getPngFileDownload().click(); + sleepTime(1000); + + //File Download Validation + //Using String Selection Class to store the path of the file + Robot robot=new Robot(); + + //Now Press CTRL + robot.keyPress(KeyEvent.VK_CONTROL); + sleepTime(2000); + + //Now Press J + robot.keyPress(KeyEvent.VK_J); + sleepTime(2000); + + //Now Release J + robot.keyRelease(KeyEvent.VK_J); + sleepTime(2000); + + //Now Release CTRL + robot.keyRelease(KeyEvent.VK_CONTROL); + sleepTime(2000); + + File filePath = new File(Data.DOWNLOAD_FILE_PATH); + File[] totalFiles = filePath.listFiles(); + for (File file:totalFiles) { + if (file.getName().equals("logo.png")) { + String fileName = fdp.getTextFileDownload().getText(); + //String fileName= fileDownload.getText(); + System.out.println(fileName + " File Is Downloaded"); + break; + } + + } + + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FileUploadValidation.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FileUploadValidation.java new file mode 100644 index 0000000..de016d2 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FileUploadValidation.java @@ -0,0 +1,83 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.FileUploadPage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.testng.Assert; +import org.testng.annotations.Test; +import java.awt.*; +import java.awt.datatransfer.StringSelection; +import java.awt.event.KeyEvent; + +public class FileUploadValidation extends BaseClass { + @Test + public void fileUpload () throws AWTException { + + LandingPage lp = new LandingPage(driver); + FileUploadPage fup = new FileUploadPage(driver); + + + + + //navigate to the file upload page + lp.getFileUpload().click(); + sleepTime(1000); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.FILE_UPLOAD_URL); + System.out.println("Link is valid"); + sleepTime(2000); + + + //Validate file name after the upload + fup.getChooseFileButton().sendKeys(Data.FILE_UPLOAD_PATH); + fup.getUploadButton().click(); + sleepTime(3000); + + driver.navigate().back(); + + //Drag and Drop Upload + WebElement inputField = driver.findElement(By.xpath("/html//div[@id='drag-drop-upload']")); + inputField.click(); + sleepTime(2000); + + Robot robot=new Robot(); + //Using String Selection Class to store the path of the file + StringSelection filepath =new StringSelection(Data.FILE_UPLOAD_PATH); + + //Copy The stored path from the String selection ,Also Opening the System Clipboard. + Toolkit.getDefaultToolkit().getSystemClipboard().setContents(filepath,null); + + //Now Press CTRL + robot.keyPress(KeyEvent.VK_CONTROL); + sleepTime(2000); + + //Now Press V + robot.keyPress(KeyEvent.VK_V); + sleepTime(2000); + + //Now Release V + robot.keyRelease(KeyEvent.VK_V); + sleepTime(2000); + + //Now Release CTRL + robot.keyRelease(KeyEvent.VK_CONTROL); + sleepTime(2000); + + //Now Press Enter + robot.keyPress(KeyEvent.VK_ENTER); + sleepTime(2000); + System.out.println("File Uploaded Successfully"); + + //Navigate Back to url + driver.navigate().to(Data.BASE_URL); + + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/ForgotPassword.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/ForgotPassword.java new file mode 100644 index 0000000..76db465 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/ForgotPassword.java @@ -0,0 +1,47 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.ForgotPasswordPage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class ForgotPassword extends BaseClass { + + @Test + public void forgotPassword (){ + + LandingPage lp = new LandingPage(driver); + ForgotPasswordPage fpp= new ForgotPasswordPage(driver); + + lp.getForgotPassword().click(); + sleepTime(3000); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.FORGOT_PASSWORD_LINK); + System.out.println("Link is valid"); + sleepTime(2000); + + //Header Validation + if (fpp.getForgotPasswordHeader().isDisplayed()){ + String forgotPasswordHeader = fpp.getForgotPasswordHeader().getText(); + Assert.assertTrue(true, forgotPasswordHeader); + System.out.println("Header is Valid"); + }else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + + //Send DATA ON EMAIL FIELD + fpp.getEmailField().sendKeys(Data.FORGOT_PASSWORD_PAGE_EMAIL); + sleepTime(2000); + fpp.getPasswordRetrieveButton().click(); + sleepTime(2000); + + driver.navigate().to(Data.BASE_URL); + sleepTime(3000); + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/InvalidPassword.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/InvalidPassword.java new file mode 100644 index 0000000..a5228c5 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/InvalidPassword.java @@ -0,0 +1,49 @@ +package com.gits.herokuapp.TestCases.FormAuthentication; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.FormAuthenticationValidate; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class InvalidPassword extends BaseClass { + + @Test + public void invalidPassword(){ + + LandingPage lp = new LandingPage(driver); + FormAuthenticationValidate fav = new FormAuthenticationValidate(driver); + + + //click on form authentication link + lp.formAuthentication.click(); + sleepTime(1000); + + //Enter valid username + fav.getUserName().sendKeys(Data.FORM_AUTHENTICATION_USER_NAME); + sleepTime(1000); + + //Enter invalid password + fav.getPassword().sendKeys(Data.FORM_AUTHENTICATION_INVALID_PASSWORD); + sleepTime(500); + + //click on login button + fav.getLoginClick().click(); + sleepTime(500); + + //validate login error massages + WebElement errorMassage = driver.findElement(By.cssSelector("div#flash")); + String actualErrorMassageText = errorMassage.getText(); + String expectedLoginErrorMassage = Data.FORM_AUTHENTICATION_PASSWORD_ALERT_TEXT; + Assert.assertEquals(actualErrorMassageText, expectedLoginErrorMassage); + + + + + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/InvalidUserName.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/InvalidUserName.java new file mode 100644 index 0000000..cdd78b8 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/InvalidUserName.java @@ -0,0 +1,44 @@ +package com.gits.herokuapp.TestCases.FormAuthentication; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.FormAuthenticationValidate; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class InvalidUserName extends BaseClass { + + @Test + public void invalidUserName(){ + LandingPage lp = new LandingPage(driver); + FormAuthenticationValidate fav = new FormAuthenticationValidate(driver); + + //Click on form authentication button + lp.getFormAuthentication().click(); + sleepTime(1000); + + //Enter inValid Username + fav.getUserName().sendKeys(Data.FORM_AUTHENTICATION_INVALID_USER_NAME); + sleepTime(1000); + + //Enter valid password + fav.getPassword().sendKeys(Data.FORM_AUTHENTICATION_PASSWORD); + sleepTime(1000); + + //click on login button + fav.getLoginClick().click(); + sleepTime(1000); + + //validate login error massage + WebElement errorMassage = driver.findElement(By.cssSelector("#flash")); + String actualErrorMassageText = errorMassage.getText(); + String expectedErrorMassageText = Data.FORM_AUTHENTICATION_USERNAME_ALERT_TEXT; + Assert.assertEquals(actualErrorMassageText, expectedErrorMassageText); + + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/InvalidUserNamePassword.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/InvalidUserNamePassword.java new file mode 100644 index 0000000..7bc1aa9 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/InvalidUserNamePassword.java @@ -0,0 +1,44 @@ +package com.gits.herokuapp.TestCases.FormAuthentication; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.FormAuthenticationValidate; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class InvalidUserNamePassword extends BaseClass { + + @Test + public void invalidUserNamePassword(){ + LandingPage lp = new LandingPage(driver); + FormAuthenticationValidate fav = new FormAuthenticationValidate(driver); + + + //click on form authentication link + lp.getFormAuthentication().click(); + sleepTime(1000); + + //Enter invalid Username + fav.getUserName().sendKeys(Data.FORM_AUTHENTICATION_INVALID_USER_NAME); + sleepTime(1000); + + //Enter invalid password + fav.getPassword().sendKeys(Data.FORM_AUTHENTICATION_INVALID_PASSWORD); + sleepTime(1000); + + //click on login button + fav.getLoginClick().click(); + sleepTime(1000); + + //validate login error massage + WebElement errorMassage = driver.findElement(By.cssSelector("#flash")); + String actualLoginErrorMassageText = errorMassage.getText(); + String expectedLoginErrorMassageText = Data.FORM_AUTHENTICATION_USERNAME_ALERT_TEXT; + Assert.assertEquals(actualLoginErrorMassageText ,expectedLoginErrorMassageText); + + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/ValidUserNamePassword.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/ValidUserNamePassword.java new file mode 100644 index 0000000..ec41e3c --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/FormAuthentication/ValidUserNamePassword.java @@ -0,0 +1,44 @@ +package com.gits.herokuapp.TestCases.FormAuthentication; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.FormAuthenticationValidate; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class ValidUserNamePassword extends BaseClass { + + @Test + public void validUserNamePassword(){ + LandingPage lp = new LandingPage(driver); + FormAuthenticationValidate fav = new FormAuthenticationValidate(driver); + + + //click on form authentication link + lp.getFormAuthentication().click(); + sleepTime(1000); + + //enter valid username + fav.getUserName().sendKeys(Data.FORM_AUTHENTICATION_USER_NAME); + sleepTime(1000); + + //enter valid password + fav.getPassword().sendKeys(Data.FORM_AUTHENTICATION_PASSWORD); + sleepTime(1000); + + //click on login button + fav.getLoginClick().click(); + sleepTime(1000); + + //validate login secure area massage + WebElement secureMassage = driver.findElement(By.cssSelector("#flash")); + String actualLoginSecureMassage = secureMassage.getText(); + String expectedLoginSecureMassage = Data.FORM_AUTHENTICATION_LOGIN_ALERT_TEXT; + Assert.assertEquals(actualLoginSecureMassage ,expectedLoginSecureMassage); + + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/Frames/Iframe.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/Frames/Iframe.java new file mode 100644 index 0000000..fe321c3 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/Frames/Iframe.java @@ -0,0 +1,59 @@ +package com.gits.herokuapp.TestCases.Frames; + + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.FramePage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class Iframe extends BaseClass { + @Test + public void iframe(){ + + LandingPage lp = new LandingPage(driver); + FramePage fp =new FramePage(driver); + + + lp.getFrames().click(); + sleepTime(2000); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.FRAMES_LINK); + System.out.println("Link is valid"); + + + fp.getIFrames().click(); + sleepTime(2000); + + //Switch to frame + /* you can enter in frame by 3 way : + 1.Index = 0,2,1 + 2.ID or Name = "" + 3.Web elements */ + + driver.switchTo().frame("mce_0_ifr"); + // WebElement txt= driver.findElement(By.xpath("//body[@id='tinymce']")); + WebElement txt= driver.findElement(By.xpath("/html//body[@id='tinymce']")); + txt.clear(); + sleepTime(3000); + txt.sendKeys(Data.INPUTS_TEXT); + sleepTime(5000); + + driver.switchTo().defaultContent(); + driver.navigate().to(Data.BASE_URL); + sleepTime(2000); + + + + + + + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/Frames/NestedFrames.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/Frames/NestedFrames.java new file mode 100644 index 0000000..2e46970 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/Frames/NestedFrames.java @@ -0,0 +1,81 @@ +package com.gits.herokuapp.TestCases.Frames; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.FramePage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class NestedFrames extends BaseClass { + @Test + public void nestedFrames(){ + + LandingPage lp = new LandingPage(driver); + FramePage fp = new FramePage(driver); + + + sleepTime(2000); + lp.getNestedFrames().click(); + sleepTime(2000); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.FRAMES_LINK); + System.out.println("Link is valid"); + sleepTime(2000); + + fp.getNestedFramesText().click(); + sleepTime(2000); + + //Frame Validation + + //Switch to Top frame + driver.switchTo().frame("frame-top"); + + //Switch to Left Frame + driver.switchTo().frame("frame-left"); + String leftFrameText = driver.findElement(By.xpath("/html/body")).getText(); + System.out.println("You are in "+ leftFrameText+" Frame"); + sleepTime(2000); + + //Switch to top frame then middle frame + driver.switchTo().parentFrame(); + driver.switchTo().frame("frame-middle"); + String middleFrameText = driver.findElement(By.xpath("/html//div[@id='content']")).getText(); + System.out.println("You are in "+ middleFrameText+" Frame"); + sleepTime(2000); + + //Switch To Top Frame then switch to Right Frame + driver.switchTo().parentFrame(); + driver.switchTo().frame("frame-right"); + String rightFrameText = driver.findElement(By.xpath("/html/body")).getText(); + System.out.println("You are in "+ rightFrameText+" Frame"); + sleepTime(2000); + + //Switch to Page(Default Content) then bottom frame + driver.switchTo().defaultContent(); + driver.switchTo().frame("frame-bottom"); + String bottomFrameText=driver.findElement(By.xpath("/html/body")).getText(); + System.out.println("You are in "+ bottomFrameText +" Frame"); + sleepTime(3000); + + + driver.navigate().to(Data.BASE_URL); + sleepTime(1000); + + + + + + + + + + + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/HorizontalSlider.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/HorizontalSlider.java new file mode 100644 index 0000000..75c0a7e --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/HorizontalSlider.java @@ -0,0 +1,70 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.HorizontalSliderPage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.Keys; +import org.openqa.selenium.WebElement; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class HorizontalSlider extends BaseClass { + @Test + public void horizontalSlider(){ + + LandingPage lp = new LandingPage(driver); + HorizontalSliderPage hsp =new HorizontalSliderPage(driver); + + //Navigate to the Corresponding Page + lp.getHorizontalSlider().click(); + sleepTime(2000); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.HORIZONTAL_SLIDER_LINK); + System.out.println("Link is valid"); + sleepTime(2000); + + + //Header Validation + if( hsp.getHorizontalSliderHeader().isDisplayed()){ + String header = hsp.getHorizontalSliderHeader().getText() ; + Assert.assertEquals(header,Data.HORIZONTAL_SLIDER_HEADER); + System.out.println("Header Text is valid"); + + } + else{ + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + + WebElement slider = driver.findElement(By.xpath("/html//div[@id='content']//input[@value='0']")); + + for (int i = 0; i <= 11; i++) { + slider.sendKeys(Keys.ARROW_RIGHT); + } + + + + + //Using Action Class TO drag the slider + //Horizontal Slider Validation +// Actions move = new Actions(driver); +// Action action = move.dragAndDropBy(slider, 20, 0).build(); +// action.perform(); +// sleepTime(2000); + +// //Slider Value Validation +// String value =driver.findElement(By.xpath("/html//span[@id='range']")).getText(); +// System.out.println( "Dragged Value " +value); +// String val ="3.5"; +// Assert.assertEquals(value ,val ); + + + + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/InfiniteScroll.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/InfiniteScroll.java new file mode 100644 index 0000000..67f6820 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/InfiniteScroll.java @@ -0,0 +1,68 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.InfiniteScrollPage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.By; +import org.openqa.selenium.JavascriptExecutor; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class InfiniteScroll extends BaseClass { + + @Test + public void infiniteScroll() { + + LandingPage lp = new LandingPage(driver); + InfiniteScrollPage isp = new InfiniteScrollPage(driver); + + lp.getInfiniteScroll().click(); + sleepTime(1000); + + //HOME URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given " + link); + Assert.assertEquals(link, Data.BASE_URL + Data.INFINITE_SCROLL_LINK); + System.out.println("Link is valid"); + + //Header Validation + if (isp.getHeader().isDisplayed()) + { + String infiniteScrollPage= isp.getHeader().getText(); + Assert.assertTrue(true, Data.INFINITE_SCROLL_HEADER); + } + else { + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + + //Infinite Scroll Validation + JavascriptExecutor jse = (JavascriptExecutor)driver; + jse.executeScript("window.scrollBy(0,200)", ""); + driver.findElement(By.xpath(".//[@id=content]/ul/li[23]/a")).click(); + sleepTime(1000); + ((JavascriptExecutor) driver).executeScript("window.scrollTo(0, document.body.scrollHeight)"); + driver.findElement(By.xpath("//*[@id=\"page-footer\"]/div/div/a")).click(); + + +// JavascriptExecutor js = (JavascriptExecutor) driver; +// +// long initialLength = (long) js.executeScript("return document.body.scrollHeight"); +// +// while (true) { +// js.executeScript("window.scrollTo(0,document.body.scrollHeight)"); +// sleepTime(1000); +// +// long currentLength = (long) js.executeScript("return document.body.scrollHeight"); +// if (initialLength == currentLength) { +// break; +// } +// +// initialLength = currentLength; + + driver.navigate().back(); + sleepTime(1000); + + } + + } +} \ No newline at end of file diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/Input.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/Input.java new file mode 100644 index 0000000..cf29b41 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/Input.java @@ -0,0 +1,45 @@ +package com.gits.herokuapp.TestCases; + + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.InputsPages; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class Input extends BaseClass { + + @Test + public void input(){ + + LandingPage lp = new LandingPage(driver); + InputsPages ip = new InputsPages(driver); + + lp.getInputs().click(); + sleepTime(2000); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.INPUTS_LINK); + System.out.println("Link is valid"); + sleepTime(2000); + + //Entering values + ip.getInputField().sendKeys(Data.INPUT_NUMBER); + sleepTime(2000); + ip.getInputField().clear(); + sleepTime(2000); + + driver.navigate().to(Data.BASE_URL); + sleepTime(2000); + + + + + + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/JavaScriptAlert.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/JavaScriptAlert.java new file mode 100644 index 0000000..9c90908 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/JavaScriptAlert.java @@ -0,0 +1,68 @@ +package com.gits.herokuapp.TestCases; + + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.JavaScriptAlertsPage; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.annotations.Test; + +public class JavaScriptAlert extends BaseClass { + @Test + + public void javaScriptAlert(){ + + LandingPage lp = new LandingPage(driver); + JavaScriptAlertsPage jsap =new JavaScriptAlertsPage(driver); + + lp.getJavaScriptAlert().click(); + sleepTime(2000); + + //Alert Text Validation + jsap.getClickForJSAlert().click(); + sleepTime(2000); + + //get Alert + System.out.println(driver.switchTo().alert().getText()); + sleepTime(2000); + + //Accept Alert + driver.switchTo().alert().accept(); + sleepTime(2000); + // System.out.println("Click For JS Alert Button Alert Accepted"); + System.out.println("JSAlert Result Text : "+ jsap.getResultText().getText()); + + + //JS Alert text Validation + jsap.getClickForJSConfirm().click(); + sleepTime(2000); + //get Alert + System.out.println(driver.switchTo().alert().getText()); + sleepTime(2000); + //Accept Alert + driver.switchTo().alert().accept(); + sleepTime(2000); + //System.out.println("Click For JS Confirm Button Alert Accepted"); + System.out.println("JS Confirm Result Text :" + jsap.getResultText().getText()); + + + //Click For JS Prompt And the alert text validation + jsap.getClickForJSPrompt().click(); + sleepTime(2000); + //get Alert + System.out.println(driver.switchTo().alert().getText()); + sleepTime(2000); + //Accept Alert + driver.switchTo().alert().sendKeys(Data.JAVA_SCRIPT_ALERT_JS_PROMPT_INPUT_TEXT); + sleepTime(2000); + driver.switchTo().alert().accept(); + sleepTime(2000); + System.out.println("JS Prompt Result Text :"+ jsap.getResultText().getText()); + sleepTime(2000); + + driver.navigate().to(Data.BASE_URL); + sleepTime(2000); + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/MouseHover.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/MouseHover.java new file mode 100644 index 0000000..7b151d0 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/MouseHover.java @@ -0,0 +1,86 @@ + package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.Pages.HoverPages; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Utilites.Data; +import org.openqa.selenium.interactions.Actions; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class MouseHover extends BaseClass { + @Test + public void mouseHover(){ + + LandingPage lp = new LandingPage(driver); + HoverPages hp = new HoverPages(driver); + + lp.getMouseHover().click(); + sleepTime(1000); + + //HOME URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.MOUSE_HOVER_LINK); + System.out.println("Link is valid"); + sleepTime(2000); + + //Mouse Hover Validation + Actions actionOne = new Actions(driver); + actionOne.moveToElement(hp.getImageOne()).perform(); + sleepTime(2000); + +// actionOne.moveToElement(hp.getImageOne()); +// actionOne.build(); +// actionOne.perform(); + +// String userNameOne = hp.getNameUserOne().getText(); +// System.out.println(userNameOne); +// +// String profileViewOne = hp.getViewProfileOne().getText(); +// System.out.println(profileViewOne); +// sleepTime(2000); +// System.out.println(" "); + + + Actions actionTwo = new Actions(driver); + actionTwo.moveToElement(hp.getImageTwo()).perform(); + sleepTime(1000); + +// actionTwo.moveToElement(hp.getImageTwo()); +// actionTwo.build(); +// actionTwo.perform(); +// sleepTime(2000); + +// String userNameTwo = hp.getNameUserTwo().getText(); +// System.out.println(userNameTwo); +// sleepTime(2000); +// +// String profileViewTwo = hp.getViewProfileTwo().getText(); +// System.out.println(profileViewTwo); +// sleepTime(2000); +// System.out.println(" "); + + + Actions actionThree = new Actions(driver); + actionThree.moveToElement(hp.getImageThree()).perform(); + sleepTime(2000); +// actionThree.moveToElement(hp.getImageThree()); +// actionThree.build(); +// actionThree.perform(); +// sleepTime(2000); + +// String userNameThree = hp.getNameUserThree().getText(); +// System.out.println(userNameThree); +// sleepTime(2000); +// +// String profileViewThree = hp.getViewProfileThree().getText(); +// System.out.println(profileViewThree); +// sleepTime(2000); + + driver.navigate().back(); + sleepTime(2000); + + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/MultipleWindows.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/MultipleWindows.java new file mode 100644 index 0000000..f1d65b7 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/MultipleWindows.java @@ -0,0 +1,87 @@ +package com.gits.herokuapp.TestCases; + + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Pages.MultipleWindow.MultipleWindowsPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +import java.util.ArrayList; +import java.util.List; + +public class MultipleWindows extends BaseClass { + @Test + public void multipleWindows(){ + + LandingPage lp = new LandingPage(driver); + MultipleWindowsPage mwp =new MultipleWindowsPage(driver); + + + //Click on The internet and multiple windows page + lp.getMultipleWindow().click(); + sleepTime(2000); + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.MULTIPLE_WINDOW); + System.out.println("Link is valid"); + sleepTime(2000); + + //click on new windows button + mwp.getClickHere().click(); + sleepTime(2000); + + //get window handlers as list + List browserTabs = new ArrayList(driver.getWindowHandles()); + //switch to new tab + driver.switchTo().window(browserTabs .get(1)); + //check is it correct page opened or not (e.g. check page's title) + // ... + //then close tab and get back + driver.close(); + driver.switchTo().window(browserTabs.get(0)); + +// // System.out.println(nwp.getNHeader1().getText()); +// String title = driver.getTitle(); +// sleepTime(2000); +// System.out.println("Base Window Title : " + title); +// sleepTime(2000); +// +// // It will return the parent window name as a String +// String parent=driver.getWindowHandle(); +// +// Set s=driver.getWindowHandles(); +// +// // Now iterate using Iterator +// Iterator I1= s.iterator(); +// +// while(I1.hasNext()) +// { +// +// String child_window=I1.next(); +// +// +// if(!parent.equals(child_window)) +// { +// driver.switchTo().window(child_window); +// sleepTime(2000); +// +// System.out.println( "New window Title : " + driver.switchTo().window(child_window).getTitle()); +// +// driver.close(); +// } +// +// } + + //switch to the parent window +// driver.switchTo().window(parent); + sleepTime(2000); + driver.navigate().to(Data.BASE_URL); + sleepTime(2000); + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/NotificationMessage.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/NotificationMessage.java new file mode 100644 index 0000000..f578cb5 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/NotificationMessage.java @@ -0,0 +1,54 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Pages.NotificationMassagesPage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class NotificationMessage extends BaseClass { + + @Test + public void notificationMessage (){ + + LandingPage lp = new LandingPage(driver); + NotificationMassagesPage nmp =new NotificationMassagesPage(driver); + + lp.getNotificationMessage().click(); + sleepTime(2000); + + + //Corresponding Page URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+Data.NOTIFICATION_MASSAGE_LINK); + System.out.println("Link is valid"); + sleepTime(2000); + + nmp.getClickHere().click(); + sleepTime(2000); + + //flash alert test validation Page URL + String flashAlert1 = nmp.getFlashAlert().getText(); + System.out.println(flashAlert1); + // Assert.assertEquals(flashAlert1," Action successful"); + sleepTime(2500); + + nmp.getClickHere().click(); + sleepTime(2000); + + String flashAlert3 = nmp.getFlashAlert().getText(); + System.out.println(flashAlert3); + sleepTime(2500); + + + driver.navigate().to(Data.BASE_URL); + sleepTime(2500); + + + + + } + +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/RedirectLink.java b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/RedirectLink.java new file mode 100644 index 0000000..55a5ad6 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/TestCases/RedirectLink.java @@ -0,0 +1,93 @@ +package com.gits.herokuapp.TestCases; + +import com.gits.herokuapp.Configuaration.BaseClass; +import com.gits.herokuapp.LandingPageConfiguaration.LandingPage; +import com.gits.herokuapp.Pages.RedirectLink.RedirectLinkPage; +import com.gits.herokuapp.Pages.RedirectLink.StatusCodePage; +import com.gits.herokuapp.Utilites.Data; +import org.testng.Assert; +import org.testng.annotations.Test; + +public class RedirectLink extends BaseClass { + @Test + public void redirectLink(){ + + LandingPage lp = new LandingPage(driver); + RedirectLinkPage rlp =new RedirectLinkPage(driver); + StatusCodePage scp =new StatusCodePage(driver); + + lp.getReDirectLink().click(); + sleepTime(2000); + + //URL Validation + String link = driver.getCurrentUrl(); + System.out.println("Given "+link); + Assert.assertEquals(link, Data.BASE_URL+ Data.REDIRECT_LINK); + System.out.println("Link is valid"); + sleepTime(2000); + + //Header1Text Validation + if( rlp.getHeader1().isDisplayed()){ + String header1 =rlp.getHeader1().getText() ; + Assert.assertEquals(header1,Data.REDIRECTION_PAGE_HEADER_1 ); + System.out.println("Header Text is valid"); + + } + else{ + System.out.println(Data.NEGATIVE_ERROR_MASSAGE); + } + rlp.getClickHere().click(); + sleepTime(1000); + + //URL Validation for status code 200 + scp.getRedirectLink200().click(); + sleepTime(2000); + String statusCode200link = driver.getCurrentUrl(); + System.out.println("Given "+statusCode200link); + Assert.assertEquals(statusCode200link, Data.BASE_URL+Data.STATUS_CODE_200_LINK); + System.out.println("Status Code 200 Link is valid"); + sleepTime(2000); + scp.getClickHere().click(); + sleepTime(2000); + + + //URL Validation for status code 301 + scp.getRedirectLink301().click(); + sleepTime(1000); + String statusCode301link = driver.getCurrentUrl(); + System.out.println("Given "+statusCode301link); + Assert.assertEquals(statusCode301link, Data.BASE_URL+Data.STATUS_CODE_301_LINK); + System.out.println("Status Code 301 Link is valid"); + sleepTime(2000); + scp.getClickHere().click(); + sleepTime(2000); + + //URL Validation for status code 404 + scp.getRedirectLink404().click(); + sleepTime(1000); + String statusCode404link = driver.getCurrentUrl(); + System.out.println("Given "+statusCode404link); + Assert.assertEquals(statusCode404link, Data.BASE_URL+Data.STATUS_CODE_404_LINK); + System.out.println("Status Code 404 Link is valid"); + scp.getClickHere().click(); + sleepTime(2000); + + + //URL Validation for status code 500 + scp.getRedirectLink500().click(); + sleepTime(1000); + String statusCode500link = driver.getCurrentUrl(); + System.out.println("Given "+statusCode500link); + Assert.assertEquals(statusCode500link, Data.BASE_URL+Data.STATUS_CODE_500_LINK); + System.out.println("Status Code 500 Link is valid"); + sleepTime(2000); + scp.getClickHere().click(); + sleepTime(2000); + + + driver.navigate().to(Data.BASE_URL); + sleepTime(1000); + + + } +} diff --git a/subroto/getwell/src/test/java/com/gits/herokuapp/Utilites/Data.java b/subroto/getwell/src/test/java/com/gits/herokuapp/Utilites/Data.java new file mode 100644 index 0000000..7fb7646 --- /dev/null +++ b/subroto/getwell/src/test/java/com/gits/herokuapp/Utilites/Data.java @@ -0,0 +1,117 @@ +package com.gits.herokuapp.Utilites; + +public class Data { + + + public static final String POSITIVE_MASSAGE ="Visible"; + public static final String NEGATIVE_ERROR_MASSAGE ="Not Visible"; + + //base url + public static final String BASE_URL ="https://the-internet.herokuapp.com/"; + + + //ABTesting + public static final String AB_TESTING = "A/B Testing"; + public static final String AB_TEST_VARIATION = "A/B Test Variation 1"; + public static final String AB_TEST_CONTROL = "A/B Test Control"; + public static final String AB_TEST_LINK = "abtest"; + + public static final String AB_TEST_PARAGRAPH = "Also known as split testing. This is a way in which businesses are able to simultaneously test and learn different versions of a page to see which text and/or functionality works best towards a desired outcome (e.g. a user action such as a click-through)."; + + //add remove element + public static final String ADD_REMOVE_ELEMENT_LINK = "add_remove_elements/"; + public static final String HEADER = "AddRemoveElementHeader"; + + //Broken images + public static final String BROKEN_IMAGE_LINK = "broken_images"; + public static final String BROKEN_IMAGE_HEADER = "Broken images"; + + //checkbox + public static final String CHECK_BOX1_SELECTED = "check box 1 selected"; + public static final String CHECK_BOX2_SELECTED = "check box 2 selected"; + public static final String CHECK_BOX_LINK = "checkboxes"; + + //disappearing elements + public static final String DISAPPEARING_ELEMENTS_LINK = "disappearing_elements"; + + //Drag and Drop + public static final String DRAG_AND_DROP_LINK = "drag_and_drop"; + + //Drop down + public static final String DROP_DOWN_LINK = "dropdown"; + public static final String DROP_DOWN_TEXT_OPTION1 = "Option 1"; + public static final String DROP_DOWN_TEXT_OPTION2 = "Option 2"; + + //Dynamic Content + public static final String DYNAMIC_CONTENT_LINK = "dynamic_content"; + + //Dynamic control + public static final String DYNAMIC_CONTROL_LINK = "dynamic_controls"; + + //File Download + public static final String FILE_DOWNLOAD_LINK = "download"; + public static final String DOWNLOAD_FILE_PATH = "C:\\Users\\eeeeeeeeeeeeeeeeeeee\\Downloads"; + + //File Upload + public static final String FILE_UPLOAD_URL = "https://the-internet.herokuapp.com/upload"; + public static final String FILE_UPLOAD_PATH = "C:\\Users\\eeeeeeeeeeeeeeeeeeee\\Downloads\\test.txt"; + + + //Forgot Password + public static final String FORGOT_PASSWORD_LINK = "forgot_password"; + public static final String FORGOT_PASSWORD_PAGE_EMAIL = "paulbadhan6128@gmail.com"; + + //Form Authentication + public static final String FORM_AUTHENTICATION_USER_NAME = "tomsmith"; + public static final String FORM_AUTHENTICATION_PASSWORD = "SuperSecretPassword!"; + public static final String FORM_AUTHENTICATION_USERNAME_ALERT_TEXT = "Your username is invalid!\n"+"×"; + public static final String FORM_AUTHENTICATION_PASSWORD_ALERT_TEXT = "Your password is invalid!\n"+ "×"; + public static final String FORM_AUTHENTICATION_LOGIN_ALERT_TEXT = "You logged into a secure area!\n"+"×"; + public static final String FORM_AUTHENTICATION_INVALID_PASSWORD = "TOMSMITH"; + public static final String FORM_AUTHENTICATION_INVALID_USER_NAME = "super secret password!"; + + //Frames + public static final String FRAMES_LINK = "frames"; + public static final String INPUTS_TEXT = "Hi,my name is badhan.god make my wish fulfill.your iframe is working and inputs is working."; + + //Horizontal slider + public static final String HORIZONTAL_SLIDER_LINK = "horizontal_slider"; + public static final String HORIZONTAL_SLIDER_HEADER = "Horizontal Slider"; + + //Mouse Hover + public static final String MOUSE_HOVER_LINK = "hovers"; + + //Multiple Window + public static final String MULTIPLE_WINDOW = "windows"; + + //InfiniteScroll + public static final String INFINITE_SCROLL_LINK = "infinite_scroll"; + public static final String INFINITE_SCROLL_HEADER = "Infinite Scroll"; + + //Inputs + public static final String INPUTS_LINK = "inputs"; + public static final String INPUT_NUMBER = "1213141516171819"; + + //JsAlert + public static final String JAVA_SCRIPT_ALERT_JS_PROMPT_INPUT_TEXT = "HI,This is subroto!"; + + //Notification + public static final String NOTIFICATION_MASSAGE_LINK = "notification_message_rendered"; + + //Notification massage + public static final String REDIRECT_LINK = "redirector"; + public static final String REDIRECTION_PAGE_HEADER_1 = "Redirection"; + + //status code 200 + public static final String STATUS_CODE_200_LINK = "status_codes/200"; + + //status code 301 + public static final String STATUS_CODE_301_LINK = "status_codes/301"; + + //status code 404 + public static final String STATUS_CODE_404_LINK = "status_codes/404"; + + //status code 500 + public static final String STATUS_CODE_500_LINK = "status_codes/500"; + +} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ConditionStatement.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ConditionStatement.java index 833deee..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ConditionStatement.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ConditionStatement.java @@ -1,9 +0,0 @@ -package com.pranrfl.getwell.BaseClass; - -public class ConditionStatement { - - public static void main(String[] args) { - - - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ForEachLoop.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ForEachLoop.java index d72b212..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ForEachLoop.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ForEachLoop.java @@ -1,53 +0,0 @@ -package com.pranrfl.getwell.BaseClass; - -public class ForEachLoop { - public static void main(String[] args) { - - - - /* - String[] names = new String[4]; - - names[0]= "badhan"; - names[1]= "mridul"; - names[2]= "bisho"; - names[3]= "talha"; - - for (int i=0;i<4;i++){ - System.out.println(names[i]); - } - */ - - /* - String[] names = {"badhan","mridul","bisho","talha"}; - System.out.println(names.length); - for (int i=0;i<4;i++){ - System.out.println(names[i]); - } - */ - - /* String [] num = {"volvo","bmw","porshe"}; - - for (String x : num){ - System.out.println(x); - } - */ - - - /* int[] num = {10,20,30,40,50,60,70,80,90,100}; - - for (int x : num){ - System.out.println(x); - } - */ - - int[] num ={10,20,30,40,50,60,70,80,90,100}; - int sum = 0; - for (int x : num){ - sum= sum+x; - } - System.out.println(sum); - - - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ForLoop.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ForLoop.java index b7268b3..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ForLoop.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/ForLoop.java @@ -1,9 +0,0 @@ -package com.pranrfl.getwell.BaseClass; - -public class ForLoop { - public static void main(String[] args) { - for (int i=1;i<=10;i++){ - System.out.println("bangladesh"); - } - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaDataType.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaDataType.java index dc16556..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaDataType.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaDataType.java @@ -1,63 +0,0 @@ -package com.pranrfl.getwell.BaseClass; - -public class JavaDataType { - - boolean myBoolean1 = false; - boolean myBoolean2 = true; - public static void main(String[] args) { - - - - - /* - Two types of DataType: - 1.primitive Datatype - 2.NonPrimitive DataType - - int a = 10; - int b = 11; - int c = 13; - int d = (int) (a+b+c); - System.out.println(d); - - - int a1= 22; - int b1= 13; - int c1 = (int) (a1-b1); - System.out.println(c1); - - - double b2 = 11.7; - double c2 = 13.32; - double d1 = (double) (b2*c2); - System.out.println(d1); - - - float a3 = 10.9f; - float b3 = 22.25f; - float d2 = (float) (a3-b3); - System.out.println(d2); - - - char c4= 'a'; - char c5= 'b'; - - - String txt = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; - - System.out.println("The Length Of The String is: "+ txt.length()); - - String txt = "good morning"; - - System.out.println(txt.toUpperCase());//Upper Case - System.out.println(txt.toLowerCase());//Lower Case - - */ - //concatenation - String firstName = "Jhon "; - String lastname = "Doe"; - System.out.println(firstName.concat(lastname)); - - - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaObject.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaObject.java index 43da048..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaObject.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaObject.java @@ -1,18 +0,0 @@ -package com.pranrfl.getwell.BaseClass; - -public class JavaObject { - public static void main(String[] args) { - - JavaObject jo = new JavaObject(); - - String [] name={"class","object","java","method"}; - System.out.println(name.length); - - for (int i=0;i<=4;i++){ - System.out.println(name[i]); - } - - jo.getClass(); - - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaPercentage.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaPercentage.java index 9d26756..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaPercentage.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaPercentage.java @@ -1,47 +0,0 @@ -package com.pranrfl.getwell.BaseClass; - - -import java.util.Scanner; - -public class JavaPercentage { - public static void main(String[] args) { - Scanner input = new Scanner(System.in); - - System.out.println("Enter two numbers:"); - double num1 = input.nextDouble(); - double num2 = input.nextDouble(); - - System.out.println("Enter an operator (+, -, *, /, %):"); - char operator = input.next().charAt(0); - - double result; - - switch (operator) { - case '+': - result = num1 + num2; - System.out.println(num1 + " + " + num2 + " = " + result); - break; - case '-': - result = num1 - num2; - System.out.println(num1 + " - " + num2 + " = " + result); - break; - case '*': - result = num1 * num2; - System.out.println(num1 + " * " + num2 + " = " + result); - break; - case '/': - result = num1 / num2; - System.out.println(num1 + " / " + num2 + " = " + result); - break; - case '%': - result = num1 % num2; - System.out.println(num1 + " % " + num2 + " = " + result); - break; - default: - System.out.println("Invalid operator"); - break; - } - - input.close(); - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaVariable.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaVariable.java index 84316ae..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaVariable.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/JavaVariable.java @@ -1,48 +0,0 @@ -package com.pranrfl.getwell.BaseClass; - -public class JavaVariable { - - /* In Java, there are different types of variables, for example: - - String - stores text, such as "Hello". String values are surrounded by double quotes - int - stores integers (whole numbers), without decimals, such as 123 or -123 - float - stores floating point numbers, with decimals, such as 19.99 or -19.99 - char - stores single characters, such as 'a' or 'B'. Char values are surrounded by single quotes - boolean - stores values with two states: true or false - - Datatype variableName = value; - - Variable is NonPrimitive Data Type - */ - - /* - A variable is a container which holds the value while the - java program is executed - - Variable is a name of memory location. there are three types of variable in java - 1. Local - 2. Instance - 3. Static - A variable is the name of a reserved area allocated in memory. - */ - //Method - //return type, name, parentheses(), open curly brace and closing curly brace - static int m = 2; // Static - int number_1 = 2; //Instance - - // var, let, const - // const a = 2; - // a = "abec" - - void method(){ - //let a = 2; - int number = 2; //Local variable (let) - } - public static void main(String[] args) { - int firstNumber = 10; - int secondNumber = 15; - int totalNumber = firstNumber + secondNumber; - System.out.println(totalNumber); - } - - } - diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/NestedLoop.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/NestedLoop.java index 2af4331..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/NestedLoop.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/NestedLoop.java @@ -1,15 +0,0 @@ -package com.pranrfl.getwell.BaseClass; - -public class NestedLoop { - public static void main(String[] args) { - - for (int s=1;s<=10;s++){ - System.out.println("=====badhan"); - - for (int v=5;v<=7;v++){ - System.out.println("hello world"); - } - } - } - -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/WhileLoop.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/WhileLoop.java index 0a40921..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/WhileLoop.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/WhileLoop.java @@ -1,22 +0,0 @@ -package com.pranrfl.getwell.BaseClass; - -public class WhileLoop { - public static void main(String[] args) { - - /* int a = 1; - while (a<=5){ - System.out.println("hello world"); - a++; - } - */ - - int i =1; - while (i<5){ - System.out.println("hello world "+ i); - i++; - } - - - - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/calculatorExercise.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/calculatorExercise.java index f753b09..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/calculatorExercise.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/BaseClass/calculatorExercise.java @@ -1,53 +0,0 @@ -package com.pranrfl.getwell.BaseClass; - -import java.util.Scanner; - -public class calculatorExercise { - public static void main(String[] args) { - - Scanner calc = new Scanner(System.in); - //(System.in) universally accessible InputStream that use to read input from the terminal window - - System.out.println("Enter The First Number: "); - double calculator1 = calc.nextDouble(); - //nextDouble() is a method of Java Scanner class which is used to scan the next token of the input as a double. - - System.out.println("Enter The Second Number: "); - double calculator2 = calc.nextDouble(); - //nextDouble() is a method of Java Scanner class which is used to scan the next token of the input as a double. - - System.out.println("Enter The Operator(+,-,*,/,%): "); - char operator = calc.next().charAt(0); - //next() method finds and returns the next complete token from this scanner. - //charAt(0) This returns the first character in our string. - - double result = 0.0; - - switch (operator) { - case '+': - result = calculator1 + calculator2; - break; - case '-': - result = calculator1 - calculator2; - break; - case '*': - result = calculator1 * calculator2; - break; - case '/': - result = calculator1 / calculator2; - break; - case '%': - result = calculator1 % calculator2; - break; - default: - System.out.println("Invalid operation"); - break; - } - - System.out.println(calculator1+" "+operator+" "+calculator2+"="+result); - - - calc.close(); - - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/Encapsulation/Person.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/Encapsulation/Person.java index cec9a10..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/Encapsulation/Person.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/Encapsulation/Person.java @@ -1,39 +0,0 @@ -package com.pranrfl.getwell.Encapsulation; - -public class Person { - - private String name,place; - private int age,phone; - - public void setName(String name){ - this.name=name; - } - - public String getName(){ - return name; - } - - public void setPlace(String place){ - this.place=place; - } - - public String getPlace(){ - return place; - } - - public void setAge(int age){ - this.age=age; - } - - public int getAge(){ - return age; - } - - public void setPhone(int phone){ - this.phone=phone; - } - - public int getPhone() { - return phone; - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/Encapsulation/Test.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/Encapsulation/Test.java index d1daad0..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/Encapsulation/Test.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/Encapsulation/Test.java @@ -1,17 +0,0 @@ -package com.pranrfl.getwell.Encapsulation; - -public class Test { - - public static void main(String[] args) { - Person p1 = new Person(); - - p1.setName("subroto"); - p1.setPlace("dhaka"); - p1.setAge(27); - p1.setPhone(1716238954); - System.out.println(p1.getName()); - System.out.println(p1.getPlace()); - System.out.println(p1.getAge()); - System.out.println(p1.getPhone()); - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassA.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassA.java index 6442c41..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassA.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassA.java @@ -1,15 +0,0 @@ -package com.pranrfl.getwell.Inheritance; - -public class ClassA { - - String name,place; - int id,age,phone; - - void display1(){ - System.out.println("Name: "+name); - System.out.println("Place: "+place); - System.out.println("ID: "+id); - System.out.println("Age: "+age); - System.out.println("Phone: "+phone); - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassB.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassB.java index 3a1dc8b..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassB.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassB.java @@ -1,12 +0,0 @@ -package com.pranrfl.getwell.Inheritance; - -public class ClassB extends ClassA{ - - String qualification; - - void display2(){ - display1(); - System.out.println("Qualification: "+qualification); - } - -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassC.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassC.java index 480b097..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassC.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/Inheritance/ClassC.java @@ -1,29 +0,0 @@ -package com.pranrfl.getwell.Inheritance; - -public class ClassC{ - - public static void main(String[] args) { - - ClassB c1 = new ClassB(); - c1.name = "subroto"; - c1.age = 27; - c1.id =20376; - c1.phone=1765423987; - c1.place = "dhaka"; - c1.qualification = "MBA"; - c1.display2(); - - ClassB c2 = new ClassB(); - c2.name = "mridul"; - c2.age = 27; - c2.id = 20978; - c2.phone = 1746582345; - c2.place = "dhaka"; - c2.qualification ="MBA"; - c2.display2(); - - - - - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/LeetCodePractice/ValidParentheses.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/LeetCodePractice/ValidParentheses.java index 3132915..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/LeetCodePractice/ValidParentheses.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/LeetCodePractice/ValidParentheses.java @@ -1,22 +0,0 @@ -package com.pranrfl.getwell.LeetCodePractice; - -import java.util.Stack; - -public class ValidParentheses { - public boolean isValid(String s){ - - Stack st = new Stack<>(); - for (char c:s.toCharArray()){ - if (c=='(' || c=='{' || c=='['){ - st.push(c); - } - else { - if (st.empty() || (st.peek()== '(' && c !=')') || (st.peek()== '{'&& c !='}') || (st.peek()== '['&& c !=']')){ - return false; - } - st.pop(); - } - } - return st.isEmpty(); - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConcept/Teacher.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConcept/Teacher.java index b104d67..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConcept/Teacher.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConcept/Teacher.java @@ -1,25 +0,0 @@ -package com.pranrfl.getwell.OOPConcept; - -public class Teacher { - - /* String Name,Gender; - int Phone; - - void setInformation(String s,String m,int ph){ - Name = s; - Gender=m; - Phone=ph; - - } - - void displayInformation(){ - - System.out.println("name: "+Name); - System.out.println("Gender: "+Gender); - System.out.println("phone: "+Phone); - System.out.println("\n\n"); - } - - */ - -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConstractor/LoadingConstractor.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConstractor/LoadingConstractor.java index 825c05a..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConstractor/LoadingConstractor.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConstractor/LoadingConstractor.java @@ -1,17 +0,0 @@ -package com.pranrfl.getwell.OOPConstractor; - -public class LoadingConstractor { - - public static void main(String[] args) { - - Teacher teacher1 = new Teacher(); - Teacher teacher2 = new Teacher("subroto paul","male"); - teacher2.DisplayInformation(); - Teacher teacher3 = new Teacher(27,1409546174); - teacher3.DisplayInformation(); - - - - - } -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConstractor/Teacher.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConstractor/Teacher.java index 72284f8..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConstractor/Teacher.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/OOPConstractor/Teacher.java @@ -1,34 +0,0 @@ -package com.pranrfl.getwell.OOPConstractor; - -public class Teacher { - - String name,gender; - int age,phone; - - Teacher(){ - System.out.println("nothing to show"); - System.out.println("\n"); - } - - Teacher(String n,String g){ - - String name = n; - String gender=g; - System.out.println("\n"); - } - - - Teacher(int a,int p){ - int age= a; - int phone= p; - System.out.println("\n"); - } - void DisplayInformation(){ - System.out.println("Name: "+name); - System.out.println("Gender: "+gender); - System.out.println("Age: "+age); - System.out.println("Phone: "+phone); - } - - -} diff --git a/subroto/getwell/src/test/java/com/pranrfl/getwell/Polymorphism/Animal.java b/subroto/getwell/src/test/java/com/pranrfl/getwell/Polymorphism/Animal.java index 58c3a94..e69de29 100644 --- a/subroto/getwell/src/test/java/com/pranrfl/getwell/Polymorphism/Animal.java +++ b/subroto/getwell/src/test/java/com/pranrfl/getwell/Polymorphism/Animal.java @@ -1,4 +0,0 @@ -package com.pranrfl.getwell.Polymorphism; - -public class Animal { -} diff --git a/subroto/getwell/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst b/subroto/getwell/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst index 6b45a09..84bc0d8 100644 --- a/subroto/getwell/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst +++ b/subroto/getwell/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/createdFiles.lst @@ -1 +1,61 @@ -com\pranrfl\getwell\AppTest.class +com\gits\herokuapp\TestCases\FileUploadValidation.class +com\gits\herokuapp\TestCases\CheckboxesValidation.class +com\gits\herokuapp\TestCases\FormAuthentication\InvalidUserNamePassword.class +com\gits\herokuapp\Pages\DisapperingElements.class +com\gits\herokuapp\TestCases\ContextMenuValidation.class +com\gits\herokuapp\TestCases\FormAuthentication\ValidUserNamePassword.class +com\gits\herokuapp\TestCases\InfiniteScroll.class +com\gits\herokuapp\TestCases\MultipleWindows.class +com\gits\herokuapp\Pages\ChallengingDOM.class +com\gits\herokuapp\TestCases\RedirectLink.class +com\gits\herokuapp\Pages\InputsPages.class +com\gits\herokuapp\Pages\FileDownloadPage.class +com\gits\herokuapp\Pages\ForgotPasswordPage.class +com\gits\herokuapp\Pages\FormAuthenticationValidate.class +com\gits\herokuapp\Pages\BrokenImagePage.class +com\gits\herokuapp\TestCases\DropDownValidation.class +com\gits\herokuapp\TestCases\HorizontalSlider.class +com\gits\herokuapp\Pages\RedirectLink\StatusCodePage.class +com\gits\herokuapp\TestCases\DigestAuthentication.class +com\gits\herokuapp\Pages\MultipleWindow\MultipleWindowsPage.class +com\gits\herokuapp\Pages\MultipleWindow\NewWindowsPage.class +com\gits\herokuapp\TestCases\MouseHover.class +com\gits\herokuapp\TestCases\NotificationMessage.class +com\gits\herokuapp\TestCases\FileDownloadValidation.class +com\gits\herokuapp\Pages\DigestAuth.class +com\gits\herokuapp\Pages\CheckBoxesPage.class +com\gits\herokuapp\Configuaration\BaseClass.class +com\gits\herokuapp\TestCases\BasicAuth.class +com\gits\herokuapp\Pages\HoverPages.class +com\gits\herokuapp\Pages\Basic_auth.class +com\gits\herokuapp\TestCases\Input.class +com\gits\herokuapp\Pages\DyanamicPages\DynamicControlsPage.class +com\gits\herokuapp\TestCases\DynamicPageValidation\DynamicContentValidation.class +com\gits\herokuapp\TestCases\DynamicPageValidation\DynamicControlsValidation.class +com\gits\herokuapp\Pages\JavaScriptAlertsPage.class +com\gits\herokuapp\TestCases\Frames\Iframe.class +com\gits\herokuapp\Pages\InfiniteScrollPage.class +com\gits\herokuapp\TestCases\Frames\NestedFrames.class +com\gits\herokuapp\Utilites\Data.class +com\gits\herokuapp\Pages\DropDown.class +com\gits\herokuapp\Pages\DyanamicPages\DynamicContentPages.class +com\gits\herokuapp\TestCases\BrokenImage.class +com\gits\herokuapp\TestCases\JavaScriptAlert.class +com\gits\herokuapp\TestCases\AddRemoveElementsValidation.class +com\gits\herokuapp\Pages\AbTesting.class +com\gits\herokuapp\TestCases\FormAuthentication\InvalidPassword.class +com\gits\herokuapp\Pages\FileUploadPage.class +com\gits\herokuapp\TestCases\ForgotPassword.class +com\gits\herokuapp\Pages\NotificationMassagesPage.class +com\gits\herokuapp\Pages\Drag_and_drop.class +com\gits\herokuapp\TestCases\FormAuthentication\InvalidUserName.class +com\gits\herokuapp\Pages\RedirectLink\RedirectLinkPage.class +com\gits\herokuapp\TestCases\ABTestingValidation.class +com\gits\herokuapp\TestCases\DisappearingElementsValidation.class +com\gits\herokuapp\Configuaration\BasePage.class +com\gits\herokuapp\Pages\AddRemoveElements.class +com\gits\herokuapp\Pages\FramePage.class +com\gits\herokuapp\LandingPageConfiguaration\LandingPage.class +com\gits\herokuapp\TestCases\DragAndDropValidation.class +com\gits\herokuapp\Pages\ContextMenuPage.class +com\gits\herokuapp\Pages\HorizontalSliderPage.class diff --git a/subroto/getwell/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst b/subroto/getwell/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst index c18b70e..e1cd37d 100644 --- a/subroto/getwell/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst +++ b/subroto/getwell/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst @@ -1 +1,81 @@ -H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\AppTest.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\AddRemoveElements.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\CheckBoxesPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\DynamicPageValidation\DynamicContentValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\FileDownloadValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\OOPConcept\Teacher.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\BrokenImagePage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\JavaScriptAlertsPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\Drag_and_drop.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\BasicAuth.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\FormAuthentication\InvalidUserNamePassword.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Utilites\Data.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\OOPConstractor\LoadingConstractor.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\InfiniteScroll.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\ForgotPasswordPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\FormAuthentication\InvalidPassword.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Configuaration\BaseClass.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\ForgotPassword.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\DropDownValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\MultipleWindows.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\JavaScriptAlert.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\DisapperingElements.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\DynamicPageValidation\DynamicControlsValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\BaseClass\ForEachLoop.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\NotificationMassagesPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\RedirectLink\StatusCodePage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Configuaration\BasePage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\InfiniteScrollPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\DigestAuthentication.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\InputsPages.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\BaseClass\JavaVariable.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\RedirectLink.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\DragAndDropValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\FormAuthentication\InvalidUserName.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\Input.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\Inheritance\ClassC.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\DisappearingElementsValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\Encapsulation\Person.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\AddRemoveElementsValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\Frames\Iframe.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\BaseClass\NestedLoop.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\BaseClass\JavaPercentage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\DigestAuth.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\FramePage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\MultipleWindow\MultipleWindowsPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\OOPConstractor\Teacher.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\RedirectLink\RedirectLinkPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\Frames\NestedFrames.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\BaseClass\ForLoop.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\BaseClass\JavaDataType.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\BaseClass\WhileLoop.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\FileUploadPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\MouseHover.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\DropDown.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\BaseClass\JavaObject.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\Inheritance\ClassA.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\FileDownloadPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\BaseClass\calculatorExercise.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\FormAuthenticationValidate.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\Basic_auth.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\FileUploadValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\BrokenImage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\FormAuthentication\ValidUserNamePassword.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\Inheritance\ClassB.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\HorizontalSliderPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\ABTestingValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\NotificationMessage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\BaseClass\ConditionStatement.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\ContextMenuPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\Polymorphism\Animal.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\DyanamicPages\DynamicControlsPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\MultipleWindow\NewWindowsPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\AbTesting.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\CheckboxesValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\ContextMenuValidation.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\HoverPages.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\Encapsulation\Test.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\ChallengingDOM.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\pranrfl\getwell\LeetCodePractice\ValidParentheses.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\LandingPageConfiguaration\LandingPage.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\Pages\DyanamicPages\DynamicContentPages.java +H:\github\newdirectory\students2023\subroto\getwell\src\test\java\com\gits\herokuapp\TestCases\HorizontalSlider.java diff --git a/subroto/getwell/target/surefire-reports/TEST-com.pranrfl.getwell.AppTest.xml b/subroto/getwell/target/surefire-reports/TEST-com.pranrfl.getwell.AppTest.xml deleted file mode 100644 index 99a94bc..0000000 --- a/subroto/getwell/target/surefire-reports/TEST-com.pranrfl.getwell.AppTest.xml +++ /dev/null @@ -1,64 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/subroto/getwell/target/surefire-reports/com.pranrfl.getwell.AppTest.txt b/subroto/getwell/target/surefire-reports/com.pranrfl.getwell.AppTest.txt deleted file mode 100644 index 274cc95..0000000 --- a/subroto/getwell/target/surefire-reports/com.pranrfl.getwell.AppTest.txt +++ /dev/null @@ -1,4 +0,0 @@ -------------------------------------------------------------------------------- -Test set: com.pranrfl.getwell.AppTest -------------------------------------------------------------------------------- -Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.109 s - in com.pranrfl.getwell.AppTest diff --git a/subroto/herokuapp/.idea/.gitignore b/subroto/herokuapp/.idea/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/subroto/herokuapp/.idea/compiler.xml b/subroto/herokuapp/.idea/compiler.xml new file mode 100644 index 0000000..4099240 --- /dev/null +++ b/subroto/herokuapp/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/subroto/herokuapp/.idea/encodings.xml b/subroto/herokuapp/.idea/encodings.xml new file mode 100644 index 0000000..aa00ffa --- /dev/null +++ b/subroto/herokuapp/.idea/encodings.xml @@ -0,0 +1,7 @@ + + + + + + + \ No newline at end of file diff --git a/subroto/herokuapp/.idea/jarRepositories.xml b/subroto/herokuapp/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/subroto/herokuapp/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/subroto/herokuapp/.idea/misc.xml b/subroto/herokuapp/.idea/misc.xml new file mode 100644 index 0000000..172627f --- /dev/null +++ b/subroto/herokuapp/.idea/misc.xml @@ -0,0 +1,12 @@ + + + + + + + + \ No newline at end of file diff --git a/subroto/herokuapp/.idea/vcs.xml b/subroto/herokuapp/.idea/vcs.xml new file mode 100644 index 0000000..b2bdec2 --- /dev/null +++ b/subroto/herokuapp/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/subroto/herokuapp/.idea/workspace.xml b/subroto/herokuapp/.idea/workspace.xml new file mode 100644 index 0000000..ae28d11 --- /dev/null +++ b/subroto/herokuapp/.idea/workspace.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1682163015510 + + + + \ No newline at end of file diff --git a/subroto/herokuapp/pom.xml b/subroto/herokuapp/pom.xml new file mode 100644 index 0000000..691ac01 --- /dev/null +++ b/subroto/herokuapp/pom.xml @@ -0,0 +1,75 @@ + + + + 4.0.0 + + com.internet.herokuapp + herokuapp + 1.0-SNAPSHOT + + herokuapp + + http://www.example.com + + + UTF-8 + 1.7 + 1.7 + + + + + junit + junit + 4.11 + test + + + + + + + + + maven-clean-plugin + 3.1.0 + + + + maven-resources-plugin + 3.0.2 + + + maven-compiler-plugin + 3.8.0 + + + maven-surefire-plugin + 2.22.1 + + + maven-jar-plugin + 3.0.2 + + + maven-install-plugin + 2.5.2 + + + maven-deploy-plugin + 2.8.2 + + + + maven-site-plugin + 3.7.1 + + + maven-project-info-reports-plugin + 3.0.0 + + + + + diff --git a/subroto/herokuapp/src/main/java/com/internet/herokuapp/App.java b/subroto/herokuapp/src/main/java/com/internet/herokuapp/App.java new file mode 100644 index 0000000..33044cf --- /dev/null +++ b/subroto/herokuapp/src/main/java/com/internet/herokuapp/App.java @@ -0,0 +1,13 @@ +package com.internet.herokuapp; + +/** + * Hello world! + * + */ +public class App +{ + public static void main( String[] args ) + { + System.out.println( "Hello World!" ); + } +} diff --git a/subroto/herokuapp/src/test/java/com/internet/herokuapp/AppTest.java b/subroto/herokuapp/src/test/java/com/internet/herokuapp/AppTest.java new file mode 100644 index 0000000..f3c5078 --- /dev/null +++ b/subroto/herokuapp/src/test/java/com/internet/herokuapp/AppTest.java @@ -0,0 +1,20 @@ +package com.internet.herokuapp; + +import static org.junit.Assert.assertTrue; + +import org.junit.Test; + +/** + * Unit test for simple App. + */ +public class AppTest +{ + /** + * Rigorous Test :-) + */ + @Test + public void shouldAnswerWithTrue() + { + assertTrue( true ); + } +} diff --git a/subroto/herokuapp/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst b/subroto/herokuapp/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst new file mode 100644 index 0000000..e69de29 diff --git a/subroto/herokuapp/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst b/subroto/herokuapp/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst new file mode 100644 index 0000000..419d8b3 --- /dev/null +++ b/subroto/herokuapp/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst @@ -0,0 +1 @@ +H:\github\newdirectory\students2023\subroto\herokuapp\src\main\java\com\internet\herokuapp\App.java