diff --git a/.idea/compiler.xml b/.idea/compiler.xml index 2ba14f9..4991768 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -9,8 +9,5 @@ - - - \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml deleted file mode 100644 index 712ab9d..0000000 --- a/.idea/jarRepositories.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_3.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_3.xml deleted file mode 100644 index aa94641..0000000 --- a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_3.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_3.xml deleted file mode 100644 index e94ceb7..0000000 --- a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_3.xml b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_3.xml deleted file mode 100644 index 656ffa4..0000000 --- a/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_docker_java_docker_java_3_2_12.xml b/.idea/libraries/Maven__com_github_docker_java_docker_java_3_2_12.xml deleted file mode 100644 index ead799c..0000000 --- a/.idea/libraries/Maven__com_github_docker_java_docker_java_3_2_12.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_docker_java_docker_java_api_3_2_12.xml b/.idea/libraries/Maven__com_github_docker_java_docker_java_api_3_2_12.xml deleted file mode 100644 index 48906a9..0000000 --- a/.idea/libraries/Maven__com_github_docker_java_docker_java_api_3_2_12.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_docker_java_docker_java_core_3_2_12.xml b/.idea/libraries/Maven__com_github_docker_java_docker_java_core_3_2_12.xml deleted file mode 100644 index a6660e1..0000000 --- a/.idea/libraries/Maven__com_github_docker_java_docker_java_core_3_2_12.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_docker_java_docker_java_transport_3_2_12.xml b/.idea/libraries/Maven__com_github_docker_java_docker_java_transport_3_2_12.xml deleted file mode 100644 index 48c238f..0000000 --- a/.idea/libraries/Maven__com_github_docker_java_docker_java_transport_3_2_12.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_docker_java_docker_java_transport_httpclient5_3_2_12.xml b/.idea/libraries/Maven__com_github_docker_java_docker_java_transport_httpclient5_3_2_12.xml deleted file mode 100644 index c9f1596..0000000 --- a/.idea/libraries/Maven__com_github_docker_java_docker_java_transport_httpclient5_3_2_12.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_javafaker_javafaker_1_0_2.xml b/.idea/libraries/Maven__com_github_javafaker_javafaker_1_0_2.xml deleted file mode 100644 index 1259710..0000000 --- a/.idea/libraries/Maven__com_github_javafaker_javafaker_1_0_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_github_mifmif_generex_1_0_2.xml b/.idea/libraries/Maven__com_github_mifmif_generex_1_0_2.xml deleted file mode 100644 index aff8216..0000000 --- a/.idea/libraries/Maven__com_github_mifmif_generex_1_0_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_code_findbugs_jsr305_1_3_9.xml b/.idea/libraries/Maven__com_google_code_findbugs_jsr305_1_3_9.xml deleted file mode 100644 index 0e66824..0000000 --- a/.idea/libraries/Maven__com_google_code_findbugs_jsr305_1_3_9.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_code_gson_gson_2_8_8.xml b/.idea/libraries/Maven__com_google_code_gson_gson_2_8_8.xml deleted file mode 100644 index 1da2fef..0000000 --- a/.idea/libraries/Maven__com_google_code_gson_gson_2_8_8.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_1_3.xml b/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_1_3.xml deleted file mode 100644 index 2343a7f..0000000 --- a/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_1_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_guava_guava_25_0_jre.xml b/.idea/libraries/Maven__com_google_guava_guava_25_0_jre.xml deleted file mode 100644 index 7de6f07..0000000 --- a/.idea/libraries/Maven__com_google_guava_guava_25_0_jre.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml b/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml deleted file mode 100644 index c06f999..0000000 --- a/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_11_0.xml b/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_11_0.xml deleted file mode 100644 index 0917a5b..0000000 --- a/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_11_0.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__com_squareup_okio_okio_1_14_0.xml b/.idea/libraries/Maven__com_squareup_okio_okio_1_14_0.xml deleted file mode 100644 index eb4535d..0000000 --- a/.idea/libraries/Maven__com_squareup_okio_okio_1_14_0.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_codec_commons_codec_1_13.xml b/.idea/libraries/Maven__commons_codec_commons_codec_1_13.xml deleted file mode 100644 index 5384f7a..0000000 --- a/.idea/libraries/Maven__commons_codec_commons_codec_1_13.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_io_commons_io_2_6.xml b/.idea/libraries/Maven__commons_io_commons_io_2_6.xml deleted file mode 100644 index d722698..0000000 --- a/.idea/libraries/Maven__commons_io_commons_io_2_6.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml b/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml deleted file mode 100644 index 2ec8376..0000000 --- a/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__dk_brics_automaton_automaton_1_11_8.xml b/.idea/libraries/Maven__dk_brics_automaton_automaton_1_11_8.xml deleted file mode 100644 index 40327c1..0000000 --- a/.idea/libraries/Maven__dk_brics_automaton_automaton_1_11_8.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__io_github_bonigarcia_webdrivermanager_5_0_3.xml b/.idea/libraries/Maven__io_github_bonigarcia_webdrivermanager_5_0_3.xml deleted file mode 100644 index 77c9168..0000000 --- a/.idea/libraries/Maven__io_github_bonigarcia_webdrivermanager_5_0_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__junit_junit_4_13_2.xml b/.idea/libraries/Maven__junit_junit_4_13_2.xml deleted file mode 100644 index 606c352..0000000 --- a/.idea/libraries/Maven__junit_junit_4_13_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_8_15.xml b/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_8_15.xml deleted file mode 100644 index c7e234c..0000000 --- a/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_8_15.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__net_java_dev_jna_jna_5_8_0.xml b/.idea/libraries/Maven__net_java_dev_jna_jna_5_8_0.xml deleted file mode 100644 index 7e440f2..0000000 --- a/.idea/libraries/Maven__net_java_dev_jna_jna_5_8_0.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_commons_commons_compress_1_21.xml b/.idea/libraries/Maven__org_apache_commons_commons_compress_1_21.xml deleted file mode 100644 index 49cd123..0000000 --- a/.idea/libraries/Maven__org_apache_commons_commons_compress_1_21.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_commons_commons_exec_1_3.xml b/.idea/libraries/Maven__org_apache_commons_commons_exec_1_3.xml deleted file mode 100644 index e064a82..0000000 --- a/.idea/libraries/Maven__org_apache_commons_commons_exec_1_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_5.xml b/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_5.xml deleted file mode 100644 index 666266c..0000000 --- a/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_5.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_client5_httpclient5_5_0_3.xml b/.idea/libraries/Maven__org_apache_httpcomponents_client5_httpclient5_5_0_3.xml deleted file mode 100644 index f1b986a..0000000 --- a/.idea/libraries/Maven__org_apache_httpcomponents_client5_httpclient5_5_0_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_apache_httpcomponents_core5_httpcore5_5_0_2.xml b/.idea/libraries/Maven__org_apache_httpcomponents_core5_httpcore5_5_0_2.xml deleted file mode 100644 index 450b1b0..0000000 --- a/.idea/libraries/Maven__org_apache_httpcomponents_core5_httpcore5_5_0_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_64.xml b/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_64.xml deleted file mode 100644 index 56cfc40..0000000 --- a/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_64.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_64.xml b/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_64.xml deleted file mode 100644 index 861cb28..0000000 --- a/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_64.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_brotli_dec_0_1_2.xml b/.idea/libraries/Maven__org_brotli_dec_0_1_2.xml deleted file mode 100644 index 2aade86..0000000 --- a/.idea/libraries/Maven__org_brotli_dec_0_1_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_checkerframework_checker_compat_qual_2_0_0.xml b/.idea/libraries/Maven__org_checkerframework_checker_compat_qual_2_0_0.xml deleted file mode 100644 index 29defe6..0000000 --- a/.idea/libraries/Maven__org_checkerframework_checker_compat_qual_2_0_0.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_14.xml b/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_14.xml deleted file mode 100644 index 1af11e4..0000000 --- a/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_14.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml deleted file mode 100644 index f58bbc1..0000000 --- a/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_jsoup_jsoup_1_14_2.xml b/.idea/libraries/Maven__org_jsoup_jsoup_1_14_2.xml deleted file mode 100644 index 4655c4f..0000000 --- a/.idea/libraries/Maven__org_jsoup_jsoup_1_14_2.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_api_3_141_59.xml b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_api_3_141_59.xml deleted file mode 100644 index ea95118..0000000 --- a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_api_3_141_59.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_chrome_driver_3_141_59.xml b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_chrome_driver_3_141_59.xml deleted file mode 100644 index aa7b6cb..0000000 --- a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_chrome_driver_3_141_59.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_edge_driver_3_141_59.xml b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_edge_driver_3_141_59.xml deleted file mode 100644 index ecf2da2..0000000 --- a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_edge_driver_3_141_59.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_firefox_driver_3_141_59.xml b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_firefox_driver_3_141_59.xml deleted file mode 100644 index 17f9a7c..0000000 --- a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_firefox_driver_3_141_59.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_ie_driver_3_141_59.xml b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_ie_driver_3_141_59.xml deleted file mode 100644 index c4c9445..0000000 --- a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_ie_driver_3_141_59.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_java_3_141_59.xml b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_java_3_141_59.xml deleted file mode 100644 index bd12142..0000000 --- a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_java_3_141_59.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_opera_driver_3_141_59.xml b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_opera_driver_3_141_59.xml deleted file mode 100644 index e3736ac..0000000 --- a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_opera_driver_3_141_59.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_remote_driver_3_141_59.xml b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_remote_driver_3_141_59.xml deleted file mode 100644 index b040848..0000000 --- a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_remote_driver_3_141_59.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_safari_driver_3_141_59.xml b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_safari_driver_3_141_59.xml deleted file mode 100644 index d7bd138..0000000 --- a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_safari_driver_3_141_59.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_support_3_141_59.xml b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_support_3_141_59.xml deleted file mode 100644 index 20ef3da..0000000 --- a/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_support_3_141_59.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_30.xml b/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_30.xml deleted file mode 100644 index f92b959..0000000 --- a/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_30.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_32.xml b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_32.xml deleted file mode 100644 index e5a84fb..0000000 --- a/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_32.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/libraries/Maven__org_yaml_snakeyaml_android_1_23.xml b/.idea/libraries/Maven__org_yaml_snakeyaml_android_1_23.xml deleted file mode 100644 index 374a800..0000000 --- a/.idea/libraries/Maven__org_yaml_snakeyaml_android_1_23.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/mavenExecutorSetting.xml b/.idea/mavenExecutorSetting.xml new file mode 100644 index 0000000..05ce2ce --- /dev/null +++ b/.idea/mavenExecutorSetting.xml @@ -0,0 +1,24 @@ + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml index 16e6960..52dab39 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -1,5 +1,6 @@ +<<<<<<< HEAD - +======= + +>>>>>>> 04f7638897eb2898d9b9188f23b1861355454c4d + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml deleted file mode 100644 index fa6bed1..0000000 --- a/.idea/modules.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - \ No newline at end of file diff --git a/Configuration.properties b/Configuration.properties index c01b88c..b3e77dc 100644 --- a/Configuration.properties +++ b/Configuration.properties @@ -1,2 +1,7 @@ +<<<<<<< HEAD +browser = chrome +url = https://www.automationexercise.com +======= browser=chrome -url=https://www.automationexercise.com/ \ No newline at end of file +url=https://www.automationexercise.com/ +>>>>>>> main diff --git a/src/test/java/pages/CartPage.java b/src/test/java/pages/CartPage.java index 83203e5..fa04568 100644 --- a/src/test/java/pages/CartPage.java +++ b/src/test/java/pages/CartPage.java @@ -10,7 +10,11 @@ public CartPage(){ PageFactory.initElements(Driver.getDriver(),this); } @FindBy(xpath ="//*[text()='Shopping Cart'] " ) - public WebElement cartPage ; + public WebElement cartPage; + @FindBy(xpath = "//i[@class='fa fa-times']") + public WebElement deleteButton; + @FindBy(xpath = "//*[contains(text(),'Cart is empty!')]") + public WebElement cartEmptyText; @FindBy(xpath ="//*[text()='Proceed To Checkout']" ) public WebElement proceedToCheckout ; @FindBy(xpath = "(//li[@class='address_address1 address_address2'])[2]" ) @@ -46,33 +50,9 @@ public CartPage(){ @FindBy (xpath = "//a[@data-qa='continue-button']" ) public WebElement continueButton; - @FindBy(xpath = "//input[@id='susbscribe_email']") - public WebElement subscriptionEmail; +} - @FindBy(linkText = "Blue Top") - public WebElement product1; + @FindBy (xpath = "//table[@id='cart_info_table']/tbody" ) + public WebElement orderTable; - @FindBy(linkText = "Men Tshirt") - public WebElement product2; - @FindBy(xpath = "(//td[@class='cart_price'])[1]") - public WebElement product_1_Price; - - @FindBy(xpath = "(//td[@class='cart_price'])[2]") - public WebElement product_2_Price; - - @FindBy(xpath = "//*[@id=\"product-1\"]/td[4]/button") - public WebElement product_1_Quantity; - - @FindBy(xpath = "//*[@id=\"product-2\"]/td[4]/button") - public WebElement product_2_Quantity; - - @FindBy(xpath = "(//p[@class='cart_total_price'])[1]") - public WebElement product_1_TotalPrice; - - @FindBy(xpath = "(//p[@class='cart_total_price'])[2]") - public WebElement product_2_TotalPrice; - - - -} \ No newline at end of file diff --git a/src/test/java/pages/ContactUsPage.java b/src/test/java/pages/ContactUsPage.java index 7673daf..5f0ab73 100644 --- a/src/test/java/pages/ContactUsPage.java +++ b/src/test/java/pages/ContactUsPage.java @@ -26,4 +26,7 @@ public ContactUsPage() { public WebElement submit; @ FindBy(xpath= "//*[text()='Success! Your details have been submitted successfully.']") public WebElement successMessage; -} \ No newline at end of file + +} + + diff --git a/src/test/java/pages/HomePage.java b/src/test/java/pages/HomePage.java index e653f27..9591137 100644 --- a/src/test/java/pages/HomePage.java +++ b/src/test/java/pages/HomePage.java @@ -1,26 +1,25 @@ package pages; +<<<<<<< HEAD +======= +import com.github.dockerjava.api.model.CpuStatsConfig; import org.openqa.selenium.By; import org.openqa.selenium.JavascriptExecutor; +>>>>>>> 04f7638897eb2898d9b9188f23b1861355454c4d import org.openqa.selenium.WebElement; import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import utilities.Driver; -import utilities.ReusableMethods; - +<<<<<<< HEAD public class HomePage { - public HomePage() { - PageFactory.initElements(Driver.getDriver(), this); + public HomePage(){ + PageFactory.initElements(Driver.getDriver(),this); } - @FindBy(xpath = "//div[@class='logo pull-left']") - public WebElement automationExerciseText; - - - @FindBy(xpath = "//a[@href='/login']") + @FindBy(xpath="//a[@href='/login']") public WebElement signUpLogin; - @FindBy(xpath = "//a[@href='/contact_us']") - public WebElement contactUsButton; + @FindBy(xpath ="//a[@href='/contact_us']") + public WebElement contactUsButton ; @FindBy(xpath = "//a[@href='/test_cases']") public WebElement testCasesButton; @FindBy(xpath = "(//a)[10]") @@ -31,7 +30,7 @@ public HomePage() { public WebElement assertMessage; @FindBy(xpath = "//*[text()='Blue Top']") public WebElement productBlueTop; - @FindBy(xpath = "(//a[@data-product-id='1'])[2]") + @FindBy(xpath ="(//a[@data-product-id='1'])[2]" ) public WebElement addToCartProductBlueTop; @FindBy(xpath = "//button[@class='btn btn-success close-modal btn-block']") public WebElement continueShopping; @@ -39,34 +38,100 @@ public HomePage() { public WebElement deleteButton; @FindBy(xpath = "//i[@class='material-icons card_travel']") public WebElement productButton; - @FindBy(xpath = "//*[contains(text(),'recommended')]") + @FindBy(xpath="//*[contains(text(),'recommended')]") public WebElement recommended; @FindBy(xpath = "(//a[@data-product-id='2' and @class='btn btn-default add-to-cart'])[3]") public WebElement recommendedAddToCart; @FindBy(xpath = "//*[contains(text(), 'View Cart')]") public WebElement viewCart; - @FindBy(xpath = "//*[contains(text(), 'Men Tshirt')]") + // @FindBy(xpath = "//*[contains(text(), 'Men Tshirt')]") +// public WebElement menTshirt; + @FindBy(xpath = "//div[@id='accordian']") + public WebElement category; + @FindBy(xpath = "//a[@href='#Women']") + public WebElement womenCategory; + @FindBy(xpath = "//*[contains(text(), 'Dress')]") + public WebElement womenDress; + @FindBy(xpath = " //i[@class='fa fa-plus']") + public WebElement menPlusSign; + + @FindBy(xpath = "//*[contains(text(), 'Tshirts')]") public WebElement menTshirt; +======= + public class HomePage { + public HomePage(){ + PageFactory.initElements(Driver.getDriver(),this); + } - @FindBy(xpath = "//div//h2[(text() ='Subscription')]") - public WebElement subscriptionText; - @FindBy(id = "susbscribe_email") - public WebElement emailTextBox; - @FindBy(xpath = "//i[@class='fa fa-arrow-circle-o-right']") - public WebElement arrowButton; - @FindBy(id = "success-subscribe") - public WebElement successMessage; + @FindBy(xpath = "//div[@class='logo pull-left']") + public WebElement automationExerciseText; - @FindBy(xpath = "//*[contains(text(),'Subscription')]") - public WebElement subciptionButton; + @FindBy(xpath="//a[@href='/login']") + public WebElement signUpLogin; + @FindBy(xpath ="//a[@href='/contact_us']") + public WebElement contactUsButton ; + @FindBy(xpath = "//a[@href='/test_cases']") + public WebElement testCasesButton; + @FindBy(xpath = "(//a)[10]") + public WebElement loggedUsername; + @FindBy(xpath = "(//a[@href='/view_cart'])[1]") + public WebElement cartButton; + @FindBy(xpath = "(//h2)[1]") + public WebElement assertMessage; + @FindBy(xpath = "//*[text()='Blue Top']") + public WebElement productBlueTop; + @FindBy(xpath ="(//a[@data-product-id='1'])[2]" ) + public WebElement addToCartProductBlueTop; + @FindBy(xpath = "//button[@class='btn btn-success close-modal btn-block']") + public WebElement continueShopping; + @FindBy(xpath = "//a[@href='/delete_account']") + public WebElement deleteButton; + @FindBy(xpath = "//i[@class='material-icons card_travel']") + public WebElement productButton; + @FindBy(xpath="//*[contains(text(),'recommended')]") + public WebElement recommended; + @FindBy(xpath = "(//a[@data-product-id='2' and @class='btn btn-default add-to-cart'])[3]") + public WebElement recommendedAddToCart; + @FindBy(xpath = "//*[contains(text(), 'View Cart')]") + public WebElement viewCart; + @FindBy(xpath = "//*[contains(text(), 'Men Tshirt')]") + public WebElement menTshirt; + @FindBy(xpath = "//*[contains(text(), 'Full-Fledged')]") + public WebElement slideImagesText; + @FindBy(xpath = "//a[@href= '/product_details/1']") + public WebElement blueTop; + //Product Detail Page + @FindBy(xpath = "//a[@href= '#reviews']") + public WebElement writeYourReview; + @FindBy(xpath = "//input[@id= 'quantity']") + public WebElement quantityOfBlueTop; + @FindBy(xpath="//button[@class='btn btn-default cart']") + public WebElement addCartBlueTop; + @FindBy(xpath="//*[contains(text(), 'View Cart')]") + public WebElement viewCartBlueTop; - @FindBy(xpath = "//*[text()='Full-Fledged practice website for Automation Engineers'][1]") - public WebElement fullText; + @FindBy(xpath = "//div//h2[(text() ='Subscription')]") + public WebElement subscriptionText; + @FindBy(id = "susbscribe_email") + public WebElement emailTextBox; + @FindBy(xpath = "//i[@class='fa fa-arrow-circle-o-right']") + public WebElement arrowButton; + @FindBy(id = "success-subscribe") + public WebElement successMessage; - @FindBy(xpath = "//*[@id='scrollUp']") - public WebElement UpArrow; + @FindBy(xpath = "//*[contains(text(),'Subscription')]") + public WebElement subciptionButton; + @FindBy(xpath = "//*[text()='Full-Fledged practice website for Automation Engineers'][1]") + public WebElement fullText; + + @FindBy(xpath = "//*[@id='scrollUp']") + public WebElement UpArrow; + +>>>>>>> 04f7638897eb2898d9b9188f23b1861355454c4d } + + diff --git a/src/test/java/pages/ProductPage.java b/src/test/java/pages/ProductPage.java index b50496c..204c909 100644 --- a/src/test/java/pages/ProductPage.java +++ b/src/test/java/pages/ProductPage.java @@ -7,26 +7,26 @@ public class ProductPage { - public ProductPage() { - PageFactory.initElements(Driver.getDriver(), this); - } + public ProductPage(){ + PageFactory.initElements(Driver.getDriver(),this); + } - @FindBy(xpath = "//*[.='All Products']") + @FindBy(xpath="//*[.='All Products']") public WebElement allProductsHead; - @FindBy(xpath = "//a[@href='/product_details/4']") + @FindBy(xpath="//a[@href='/product_details/4']") public WebElement productDetail; //These elements are in the product detail page for Stylish Dress - @FindBy(xpath = "//a[@href='#reviews']") + @FindBy(xpath="//a[@href='#reviews']") public WebElement productReview; - @FindBy(xpath = "//input[@id='name']") + @FindBy(xpath="//input[@id='name']") public WebElement nameBox; - @FindBy(xpath = "//input[@id='email']") + @FindBy(xpath="//input[@id='email']") public WebElement emailBox; - @FindBy(xpath = "//textarea[@id='review']") + @FindBy(xpath="//textarea[@id='review']") public WebElement reviewArea; - @FindBy(xpath = "//button[@id='button-review']") + @FindBy(xpath="//button[@id='button-review']") public WebElement submitButton; - @FindBy(xpath = "//div[@class='alert-success alert']") + @FindBy(xpath="//div[@class='alert-success alert']") public WebElement successMessage; @@ -48,7 +48,6 @@ public ProductPage() { @FindBy(xpath = "//div[@class='product-image-wrapper']") public WebElement allProducts; -} @FindBy(xpath = "//img[@src='/get_product_picture/1']") public WebElement productPicture1; @@ -73,7 +72,4 @@ public ProductPage() { @FindBy(xpath="//h2[@class='title text-center']") public WebElement searchedProductsText; - } - - diff --git a/src/test/java/pages/SignInPage.java b/src/test/java/pages/SignInPage.java index 8b120b1..1f04e33 100644 --- a/src/test/java/pages/SignInPage.java +++ b/src/test/java/pages/SignInPage.java @@ -7,6 +7,7 @@ public class SignInPage { public SignInPage() { PageFactory.initElements(Driver.getDriver(), this); } + //Verify that 'ENTER ACCOUNT INFORMATION' is visible @FindBy(xpath = "(//b)[1]") public WebElement enterAccount; @@ -56,4 +57,4 @@ public SignInPage() { public WebElement accountCrated; @FindBy(xpath = "//*[@data-qa='continue-button']") public WebElement continue1; -} \ No newline at end of file +} diff --git a/src/test/java/pages/SignUpLoginPage.java b/src/test/java/pages/SignUpLoginPage.java index b52a8db..cf3ded0 100644 --- a/src/test/java/pages/SignUpLoginPage.java +++ b/src/test/java/pages/SignUpLoginPage.java @@ -6,10 +6,12 @@ import utilities.Driver; public class SignUpLoginPage { + public SignUpLoginPage() { PageFactory.initElements(Driver.getDriver(), this); } + @FindBy(xpath = "(//h2)[3]") public WebElement newUserSignUpText; @FindBy(name = "name") @@ -26,10 +28,12 @@ public SignUpLoginPage() { public WebElement loginButton; @FindBy(xpath = "//*[text()='Your email or password is incorrect!']") public WebElement incorrectEmail; + @FindBy(xpath = "//h2[text()='Login to your account']") public WebElement loginMessage; @FindBy(partialLinkText = "Logged in as") public WebElement loggedInAsMessage; @FindBy(xpath = "//a[@href='/logout']") public WebElement logOutbutton; + } diff --git a/src/test/java/tests/TC001_tests.java b/src/test/java/tests/TC001_tests.java new file mode 100644 index 0000000..73278af --- /dev/null +++ b/src/test/java/tests/TC001_tests.java @@ -0,0 +1,5 @@ +package tests; + +public class TC001_tests { + +} diff --git a/src/test/java/tests/TC12_AddProductsInCart.java b/src/test/java/tests/TC12_AddProductsInCart.java index d0a8d84..eb90e51 100644 --- a/src/test/java/tests/TC12_AddProductsInCart.java +++ b/src/test/java/tests/TC12_AddProductsInCart.java @@ -69,11 +69,5 @@ public void addProductsInCart(){ Assert.assertEquals("Rs. 400",cartPage.product_2_TotalPrice.getText()); - - - - - - } } diff --git a/src/test/java/tests/TC13_DemetA.java b/src/test/java/tests/TC13_DemetA.java new file mode 100644 index 0000000..a15f21d --- /dev/null +++ b/src/test/java/tests/TC13_DemetA.java @@ -0,0 +1,42 @@ +package tests; + + +import org.junit.After; +import org.junit.Test; +import pages.HomePage; +import utilities.ConfigurationReader; +import utilities.Driver; +import utilities.ReusableMethods; + +/* + 1. Launch browser + 2. Navigate to url 'http://automationexercise.com' + 3. Verify that home page is visible successfully + 4. Click 'View Product' for any product on home page + 5. Verify product detail is opened + 6. Increase quantity to 4 + 7. Click 'Add to cart' button + 8. Click 'View Cart' button + 9. Verify that product is displayed in cart page with exact quantity + */ +public class TC13_DemetA { + HomePage homePage; + @Test + public void test13() { + homePage = new HomePage(); + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + ReusableMethods.waitForVisibility(homePage.slideImagesText, 10); + ReusableMethods.verifyElementDisplayed(homePage.slideImagesText); + homePage.blueTop.click(); + ReusableMethods.verifyElementDisplayed(homePage.writeYourReview); + homePage.quantityOfBlueTop.sendKeys("4"); + homePage.addCartBlueTop.click(); + homePage.viewCartBlueTop.click(); + ReusableMethods.verifyElementDisplayed(homePage.blueTop); + } + @After + public void tearDown(){ + Driver.closeDriver(); + } + +} diff --git a/src/test/java/tests/TC14_DemetA.java b/src/test/java/tests/TC14_DemetA.java new file mode 100644 index 0000000..069e135 --- /dev/null +++ b/src/test/java/tests/TC14_DemetA.java @@ -0,0 +1,26 @@ +package tests; + + /* + 1. Launch browser + 2. Navigate to url 'http://automationexercise.com' + 3. Verify that home page is visible successfully + 4. Add products to cart + 5. Click 'Cart' button + 6. Verify that cart page is displayed + 7. Click Proceed To Checkout + 8. Click 'Register / Login' button + 9. Fill all details in Signup and create account + 10. Verify 'ACCOUNT CREATED!' and click 'Continue' button + 11. Verify ' Logged in as username' at top + 12.Click 'Cart' button + 13. Click 'Proceed To Checkout' button + 14. Verify Address Details and Review Your Order + 15. Enter description in comment text area and click 'Place Order' + 16. Enter payment details: Name on Card, Card Number, CVC, Expiration date + 17. Click 'Pay and Confirm Order' button + 18. Verify success message 'Your order has been placed successfully!' + 19. Click 'Delete Account' button + 20. Verify 'ACCOUNT DELETED!' and click 'Continue' button + */ +public class TC14_DemetA { +} diff --git a/src/test/java/tests/TC15_AslanY.java b/src/test/java/tests/TC15_AslanY.java new file mode 100644 index 0000000..0dce79a --- /dev/null +++ b/src/test/java/tests/TC15_AslanY.java @@ -0,0 +1,34 @@ +package tests; + +import org.junit.Assert; +import org.junit.Test; +import pages.HomePage; +import pages.SignUpLoginPage; +import utilities.ConfigurationReader; +import utilities.Driver; + +public class TC15_AslanY { + + HomePage homePage; + SignUpLoginPage signUpLoginPage; + @Test + public void registerBeforeCheckout() { + + //Navigate to url 'http://automationexercise.com' + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + + //Verify that home page is visible successfully + String actualTitle = Driver.getDriver().getTitle(); + String expectedTitle = "Automation Exercise"; + Assert.assertEquals(actualTitle, expectedTitle); + + homePage = new HomePage(); + homePage.signUpLogin.click(); + + signUpLoginPage = new SignUpLoginPage(); + signUpLoginPage.signUpName.sendKeys("test"); + signUpLoginPage.signUpEmail.sendKeys("testtest@test.com"); + signUpLoginPage.signInButton.click(); + + } +} diff --git a/src/test/java/tests/TC20_SuhedaY.java b/src/test/java/tests/TC20_SuhedaY.java new file mode 100644 index 0000000..85ea1d0 --- /dev/null +++ b/src/test/java/tests/TC20_SuhedaY.java @@ -0,0 +1,108 @@ +package tests; + +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.openqa.selenium.*; +import pages.CartPage; +import pages.HomePage; +import pages.ProductPage; +import pages.SignUpLoginPage; +import utilities.ConfigurationReader; +import utilities.Driver; +import utilities.JSUtils; +import utilities.ReusableMethods; + +import java.util.List; +import java.util.concurrent.TimeUnit; + +public class TC20_SuhedaY { + + + @Before + public void setUp() { + //Launch browser + //Navigate to url 'http://automationexercise.com' + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + Driver.getDriver().manage().window().maximize(); + Driver.getDriver().manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); + } + + HomePage homePage = new HomePage(); + ProductPage productPage = new ProductPage(); + SignUpLoginPage signUpLoginPage = new SignUpLoginPage(); + CartPage cartPage = new CartPage(); + + JavascriptExecutor js = (JavascriptExecutor) Driver.getDriver(); + + @Test + public void viewAndCartBrandProducts() { + + //Click on 'Products' button + homePage.productButton.click(); + + //Verify user is navigated to ALL PRODUCTS page successfully + Assert.assertTrue(productPage.allProductsHead.isDisplayed()); + + //Enter product name in search input and click search button + productPage.searchProduct.sendKeys("jeans"); + productPage.searchButton.click(); + + //Verify 'SEARCHED PRODUCTS' is visible + Assert.assertTrue(productPage.searchedProductsText.isDisplayed()); + + //Verify all the products related to search are visible + List allSearchedProducts = Driver.getDriver().findElements(By.xpath("//div[@class='product-overlay']")); + System.out.println(allSearchedProducts.size()); + for (WebElement element : allSearchedProducts) { + Assert.assertTrue(element.isDisplayed()); + } + /**There is a bug. For example when "dress" searched,unlike dresses, other outfits are also visible. But I can't it automize + because name of every image, which is related to dress, doesn't containing "dress" keyword. */ + + // Add those products to cart + List allAddToCart = Driver.getDriver().findElements(By.xpath("//*[@data-product-id]")); + System.out.println(allAddToCart.size()); + //Because of two cart symbols for each product,it should be taken half of product size + int actualAddedProductSize = allAddToCart.size() / 2; + + for (int i = 0; i < allAddToCart.size() / 2; i++) { + WebElement each = allAddToCart.get(2 * i); + //WebElement each=allAddToCart.get(2*i + 1); + + JSUtils.scrollIntoViewJS(each); + ReusableMethods.waitFor(2); + each.click(); + productPage.continueShopping.click(); + } + + //Click 'Cart' button and verify that products are visible in cart + homePage.cartButton.click(); + + List TotalRowsOrder = cartPage.orderTable.findElements(By.tagName("tr")); + System.out.println("Total number of rows in the table are " + TotalRowsOrder.size()); + Assert.assertEquals(actualAddedProductSize, TotalRowsOrder.size()); + + + //Click 'Signup / Login' button and submit login details + homePage.signUpLogin.click(); + + signUpLoginPage.loginPassword.sendKeys("alican"); + /* try{ + signUpLoginPage.signinLoginEmail.sendKeys("ali_can@gmail.com"); + // js.executeScript("document.getElementById('email').value='ali_can@gmail.com'"); + }catch(Exception e){ + System.out.println("Failed"); + } +*/ + signUpLoginPage.loginButton.click(); + + //Again, go to Cart page + homePage.cartButton.click(); + + //Verify that those products are visible in cart after login as well + List TotalRowsOrder2 = cartPage.orderTable.findElements(By.tagName("tr")); + Assert.assertEquals(TotalRowsOrder.size(), TotalRowsOrder2.size()); + + } +} diff --git a/src/test/java/tests/TC21_HaticeC.java b/src/test/java/tests/TC21_HaticeC.java new file mode 100644 index 0000000..b5777d4 --- /dev/null +++ b/src/test/java/tests/TC21_HaticeC.java @@ -0,0 +1,50 @@ +package tests; + +import com.github.javafaker.Faker; +import org.junit.After; +import org.junit.Test; +import pages.HomePage; +import pages.ProductPage; +import utilities.ConfigurationReader; +import utilities.Driver; +import utilities.ReusableMethods; + + /* + 1. Launch browser + 2. Navigate to url 'http://automationexercise.com' + 3. Click on 'Products' button + 4. Verify user is navigated to ALL PRODUCTS page successfully + 5. Click on 'View Product' button + 6. Verify 'Write Your Review' is visible + 7. Enter name, email and review + 8. Click 'Submit' button + 9. Verify success message 'Thank you for your review.' + */ + +public class TC21_HaticeC { + HomePage homePage; + ProductPage productPage; + Faker faker; + + @Test + public void test21() { + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + homePage = new HomePage(); + homePage.productButton.click(); + productPage = new ProductPage(); + ReusableMethods.verifyElementDisplayed(productPage.allProductsHead); + productPage.productDetail.click(); + ReusableMethods.verifyElementDisplayed(productPage.productReview); + faker = new Faker(); + productPage.nameBox.sendKeys(faker.name().fullName()); + productPage.emailBox.sendKeys(faker.internet().emailAddress()); + productPage.reviewArea.sendKeys("Nice color"); + productPage.submitButton.click(); + ReusableMethods.waitForVisibility(productPage.successMessage, 2); + ReusableMethods.verifyElementDisplayed(productPage.successMessage); + } + @After + public void tearDown(){ + Driver.closeDriver(); + } +} diff --git a/src/test/java/tests/TC22_HaticeC.java b/src/test/java/tests/TC22_HaticeC.java new file mode 100644 index 0000000..4693103 --- /dev/null +++ b/src/test/java/tests/TC22_HaticeC.java @@ -0,0 +1,38 @@ +package tests; + +import org.junit.After; +import org.junit.Test; +import pages.HomePage; +import utilities.ConfigurationReader; +import utilities.Driver; +import utilities.ReusableMethods; + + /* + 1. Launch browser + 2. Navigate to url 'http://automationexercise.com' + 3. Scroll to bottom of page + 4. Verify 'RECOMMENDED ITEMS' are visible + 5. Click on 'Add To Cart' on Recommended product + 6. Click on 'View Cart' button + 7. Verify that product is displayed in cart page + */ + +public class TC22_HaticeC { + HomePage homePage; + + @Test + public void test22() { + homePage = new HomePage(); + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + ReusableMethods.scrollToElement(homePage.recommended); + ReusableMethods.verifyElementDisplayed(homePage.recommended); + ReusableMethods.waitForVisibility(homePage.recommendedAddToCart, 10); + homePage.recommendedAddToCart.click(); + homePage.viewCart.click(); + ReusableMethods.verifyElementDisplayed(homePage.menTshirt); + } + @After + public void tearDown(){ + Driver.closeDriver(); + } +} diff --git a/src/test/java/tests/Test17_SerpilMTest.java b/src/test/java/tests/Test17_SerpilMTest.java new file mode 100644 index 0000000..1932103 --- /dev/null +++ b/src/test/java/tests/Test17_SerpilMTest.java @@ -0,0 +1,44 @@ +package tests; + +import com.google.common.base.*; +import org.junit.*; +import pages.*; +import utilities.*; + +public class Test17_SerpilMTest { + + HomePage homePage; + CartPage cartPage; + @Test + public void test1() throws InterruptedException { + + // 1. Launch browser + // 2. Navigate to url 'http://automationexercise.com' + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + + // 3. Verify that home page is visible successfully + homePage = new HomePage(); + Assert.assertTrue(homePage.signUpLogin.isDisplayed()); + + // 4. Add products to cart + //Action actions = new Actions(Driver.getDriver()); + //actions.moveToElement(homePage.productBlueTop).perform(); + //Driver.getDriver().wait(2); + homePage.productBlueTop.click(); + + // 5. Click 'Cart' button + homePage.addToCartProductBlueTop.click(); + + // 6. Verify that cart page is displayed + homePage.viewCart.click(); + cartPage =new CartPage(); + Assert.assertTrue(cartPage.cartPage.isDisplayed()); + + // 7. Click 'X' button corresponding to particular product + cartPage.deleteButton.click(); + + // 8. Verify that product is removed from the cart + Assert.assertTrue(cartPage.cartEmptyText.isDisplayed()); + } +} + diff --git a/src/test/java/tests/Tests18_SerpilMTest.java b/src/test/java/tests/Tests18_SerpilMTest.java new file mode 100644 index 0000000..a2a482a --- /dev/null +++ b/src/test/java/tests/Tests18_SerpilMTest.java @@ -0,0 +1,44 @@ + +package tests; + +import com.google.common.base.*; +import org.junit.*; +import pages.*; +import utilities.*; + +public class Tests18_SerpilMTest { + HomePage homePage; + CartPage cartPage; + + @Test + public void test1() throws InterruptedException { + + // 1. Launch browser + // 2. Navigate to url 'http://automationexercise.com' + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + + // 3. Verify that categories are visible on left side bar + homePage = new HomePage(); + Assert.assertTrue(homePage.category.isDisplayed()); + + // 4. Click on 'Women' category + //Action actions = new Actions(Driver.getDriver()); + //actions.moveToElement(homePage.productBlueTop).perform(); + homePage.womenCategory.click(); + //Driver.getDriver().wait(2); + + // 5. Click on any category link under 'Women' category, for example: Dress + homePage.womenDress.isEnabled(); + + // 6. Verify that category page is displayed and confirm text 'WOMEN - TOPS PRODUCTS' + homePage.womenCategory.click(); + Assert.assertTrue(homePage.womenCategory.isDisplayed()); + + // 7. On left side bar, click on any sub-category link of 'Men' category + homePage.menTshirt.click(); +//test + // 8. Verify that user is navigated to that category page + homePage.menPlusSign.click(); + Assert.assertTrue(homePage.menTshirt.isDisplayed()); + } +} \ No newline at end of file