From 593721be6bc3a5ef862e8823586d4a1e677408d4 Mon Sep 17 00:00:00 2001 From: Rose Date: Sat, 29 Jan 2022 20:56:46 -0600 Subject: [PATCH 1/8] deneme --- .idea/compiler.xml | 13 ++++++++ .idea/vcs.xml | 6 ++++ .idea/workspace.xml | 78 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 97 insertions(+) create mode 100644 .idea/compiler.xml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml new file mode 100644 index 0000000..f9e9b8b --- /dev/null +++ b/.idea/compiler.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000..35eb1dd --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000..7ea2385 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 1643338217304 + + + + + + + \ No newline at end of file From 685a9957b9a3505bb804651a51f2ce768802ef7b Mon Sep 17 00:00:00 2001 From: Rose Date: Sat, 29 Jan 2022 21:47:23 -0600 Subject: [PATCH 2/8] deneme --- .idea/compiler.xml | 5 ++++- .idea/jarRepositories.xml | 20 ++++++++++++++++++ ...ackson_core_jackson_annotations_2_10_3.xml | 13 ++++++++++++ ...erxml_jackson_core_jackson_core_2_10_3.xml | 13 ++++++++++++ ...l_jackson_core_jackson_databind_2_10_3.xml | 13 ++++++++++++ ..._github_docker_java_docker_java_3_2_12.xml | 13 ++++++++++++ ...hub_docker_java_docker_java_api_3_2_12.xml | 13 ++++++++++++ ...ub_docker_java_docker_java_core_3_2_12.xml | 13 ++++++++++++ ...cker_java_docker_java_transport_3_2_12.xml | 13 ++++++++++++ ...cker_java_transport_httpclient5_3_2_12.xml | 13 ++++++++++++ ...__com_github_javafaker_javafaker_1_0_2.xml | 13 ++++++++++++ ...Maven__com_github_mifmif_generex_1_0_2.xml | 13 ++++++++++++ ..._com_google_code_findbugs_jsr305_1_3_9.xml | 13 ++++++++++++ ...Maven__com_google_code_gson_gson_2_8_8.xml | 13 ++++++++++++ ...rorprone_error_prone_annotations_2_1_3.xml | 13 ++++++++++++ ...Maven__com_google_guava_guava_25_0_jre.xml | 13 ++++++++++++ ...m_google_j2objc_j2objc_annotations_1_1.xml | 13 ++++++++++++ ...en__com_squareup_okhttp3_okhttp_3_11_0.xml | 13 ++++++++++++ .../Maven__com_squareup_okio_okio_1_14_0.xml | 13 ++++++++++++ ...aven__commons_codec_commons_codec_1_13.xml | 13 ++++++++++++ .../Maven__commons_io_commons_io_2_6.xml | 13 ++++++++++++ .../Maven__commons_lang_commons_lang_2_6.xml | 13 ++++++++++++ ...n__dk_brics_automaton_automaton_1_11_8.xml | 13 ++++++++++++ ...thub_bonigarcia_webdrivermanager_5_0_3.xml | 13 ++++++++++++ .idea/libraries/Maven__junit_junit_4_13_2.xml | 13 ++++++++++++ ...Maven__net_bytebuddy_byte_buddy_1_8_15.xml | 13 ++++++++++++ .../Maven__net_java_dev_jna_jna_5_8_0.xml | 13 ++++++++++++ ...g_apache_commons_commons_compress_1_21.xml | 13 ++++++++++++ ...n__org_apache_commons_commons_exec_1_3.xml | 13 ++++++++++++ ...__org_apache_commons_commons_lang3_3_5.xml | 13 ++++++++++++ ...tpcomponents_client5_httpclient5_5_0_3.xml | 13 ++++++++++++ ...e_httpcomponents_core5_httpcore5_5_0_2.xml | 13 ++++++++++++ ...__org_bouncycastle_bcpkix_jdk15on_1_64.xml | 13 ++++++++++++ ...__org_bouncycastle_bcprov_jdk15on_1_64.xml | 13 ++++++++++++ .../libraries/Maven__org_brotli_dec_0_1_2.xml | 13 ++++++++++++ ...kerframework_checker_compat_qual_2_0_0.xml | 13 ++++++++++++ ...s_mojo_animal_sniffer_annotations_1_14.xml | 13 ++++++++++++ .../Maven__org_hamcrest_hamcrest_core_1_3.xml | 13 ++++++++++++ .../Maven__org_jsoup_jsoup_1_14_2.xml | 13 ++++++++++++ ...eniumhq_selenium_selenium_api_3_141_59.xml | 13 ++++++++++++ ...lenium_selenium_chrome_driver_3_141_59.xml | 13 ++++++++++++ ...selenium_selenium_edge_driver_3_141_59.xml | 13 ++++++++++++ ...enium_selenium_firefox_driver_3_141_59.xml | 13 ++++++++++++ ...q_selenium_selenium_ie_driver_3_141_59.xml | 13 ++++++++++++ ...niumhq_selenium_selenium_java_3_141_59.xml | 13 ++++++++++++ ...elenium_selenium_opera_driver_3_141_59.xml | 13 ++++++++++++ ...lenium_selenium_remote_driver_3_141_59.xml | 13 ++++++++++++ ...lenium_selenium_safari_driver_3_141_59.xml | 13 ++++++++++++ ...mhq_selenium_selenium_support_3_141_59.xml | 13 ++++++++++++ ...Maven__org_slf4j_jcl_over_slf4j_1_7_30.xml | 13 ++++++++++++ .../Maven__org_slf4j_slf4j_api_1_7_32.xml | 13 ++++++++++++ ...Maven__org_yaml_snakeyaml_android_1_23.xml | 13 ++++++++++++ .idea/misc.xml | 10 +++++++++ .idea/modules.xml | 8 +++++++ .idea/runConfigurations.xml | 10 +++++++++ .idea/workspace.xml | 21 +++++-------------- 56 files changed, 707 insertions(+), 17 deletions(-) create mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_3.xml create mode 100644 .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_3.xml create mode 100644 .idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_3.xml create mode 100644 .idea/libraries/Maven__com_github_docker_java_docker_java_3_2_12.xml create mode 100644 .idea/libraries/Maven__com_github_docker_java_docker_java_api_3_2_12.xml create mode 100644 .idea/libraries/Maven__com_github_docker_java_docker_java_core_3_2_12.xml create mode 100644 .idea/libraries/Maven__com_github_docker_java_docker_java_transport_3_2_12.xml create mode 100644 .idea/libraries/Maven__com_github_docker_java_docker_java_transport_httpclient5_3_2_12.xml create mode 100644 .idea/libraries/Maven__com_github_javafaker_javafaker_1_0_2.xml create mode 100644 .idea/libraries/Maven__com_github_mifmif_generex_1_0_2.xml create mode 100644 .idea/libraries/Maven__com_google_code_findbugs_jsr305_1_3_9.xml create mode 100644 .idea/libraries/Maven__com_google_code_gson_gson_2_8_8.xml create mode 100644 .idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_1_3.xml create mode 100644 .idea/libraries/Maven__com_google_guava_guava_25_0_jre.xml create mode 100644 .idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml create mode 100644 .idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_11_0.xml create mode 100644 .idea/libraries/Maven__com_squareup_okio_okio_1_14_0.xml create mode 100644 .idea/libraries/Maven__commons_codec_commons_codec_1_13.xml create mode 100644 .idea/libraries/Maven__commons_io_commons_io_2_6.xml create mode 100644 .idea/libraries/Maven__commons_lang_commons_lang_2_6.xml create mode 100644 .idea/libraries/Maven__dk_brics_automaton_automaton_1_11_8.xml create mode 100644 .idea/libraries/Maven__io_github_bonigarcia_webdrivermanager_5_0_3.xml create mode 100644 .idea/libraries/Maven__junit_junit_4_13_2.xml create mode 100644 .idea/libraries/Maven__net_bytebuddy_byte_buddy_1_8_15.xml create mode 100644 .idea/libraries/Maven__net_java_dev_jna_jna_5_8_0.xml create mode 100644 .idea/libraries/Maven__org_apache_commons_commons_compress_1_21.xml create mode 100644 .idea/libraries/Maven__org_apache_commons_commons_exec_1_3.xml create mode 100644 .idea/libraries/Maven__org_apache_commons_commons_lang3_3_5.xml create mode 100644 .idea/libraries/Maven__org_apache_httpcomponents_client5_httpclient5_5_0_3.xml create mode 100644 .idea/libraries/Maven__org_apache_httpcomponents_core5_httpcore5_5_0_2.xml create mode 100644 .idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_64.xml create mode 100644 .idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_64.xml create mode 100644 .idea/libraries/Maven__org_brotli_dec_0_1_2.xml create mode 100644 .idea/libraries/Maven__org_checkerframework_checker_compat_qual_2_0_0.xml create mode 100644 .idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_14.xml create mode 100644 .idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml create mode 100644 .idea/libraries/Maven__org_jsoup_jsoup_1_14_2.xml create mode 100644 .idea/libraries/Maven__org_seleniumhq_selenium_selenium_api_3_141_59.xml create mode 100644 .idea/libraries/Maven__org_seleniumhq_selenium_selenium_chrome_driver_3_141_59.xml create mode 100644 .idea/libraries/Maven__org_seleniumhq_selenium_selenium_edge_driver_3_141_59.xml create mode 100644 .idea/libraries/Maven__org_seleniumhq_selenium_selenium_firefox_driver_3_141_59.xml create mode 100644 .idea/libraries/Maven__org_seleniumhq_selenium_selenium_ie_driver_3_141_59.xml create mode 100644 .idea/libraries/Maven__org_seleniumhq_selenium_selenium_java_3_141_59.xml create mode 100644 .idea/libraries/Maven__org_seleniumhq_selenium_selenium_opera_driver_3_141_59.xml create mode 100644 .idea/libraries/Maven__org_seleniumhq_selenium_selenium_remote_driver_3_141_59.xml create mode 100644 .idea/libraries/Maven__org_seleniumhq_selenium_selenium_safari_driver_3_141_59.xml create mode 100644 .idea/libraries/Maven__org_seleniumhq_selenium_selenium_support_3_141_59.xml create mode 100644 .idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_30.xml create mode 100644 .idea/libraries/Maven__org_slf4j_slf4j_api_1_7_32.xml create mode 100644 .idea/libraries/Maven__org_yaml_snakeyaml_android_1_23.xml create mode 100644 .idea/misc.xml create mode 100644 .idea/modules.xml create mode 100644 .idea/runConfigurations.xml diff --git a/.idea/compiler.xml b/.idea/compiler.xml index f9e9b8b..68815dc 100644 --- a/.idea/compiler.xml +++ b/.idea/compiler.xml @@ -6,8 +6,11 @@ - + + + + \ No newline at end of file diff --git a/.idea/jarRepositories.xml b/.idea/jarRepositories.xml new file mode 100644 index 0000000..712ab9d --- /dev/null +++ b/.idea/jarRepositories.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..aa94641 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..e94ceb7 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..656ffa4 --- /dev/null +++ b/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_10_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..ead799c --- /dev/null +++ b/.idea/libraries/Maven__com_github_docker_java_docker_java_3_2_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..48906a9 --- /dev/null +++ b/.idea/libraries/Maven__com_github_docker_java_docker_java_api_3_2_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..a6660e1 --- /dev/null +++ b/.idea/libraries/Maven__com_github_docker_java_docker_java_core_3_2_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..48c238f --- /dev/null +++ b/.idea/libraries/Maven__com_github_docker_java_docker_java_transport_3_2_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..c9f1596 --- /dev/null +++ b/.idea/libraries/Maven__com_github_docker_java_docker_java_transport_httpclient5_3_2_12.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..1259710 --- /dev/null +++ b/.idea/libraries/Maven__com_github_javafaker_javafaker_1_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..aff8216 --- /dev/null +++ b/.idea/libraries/Maven__com_github_mifmif_generex_1_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..0e66824 --- /dev/null +++ b/.idea/libraries/Maven__com_google_code_findbugs_jsr305_1_3_9.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..1da2fef --- /dev/null +++ b/.idea/libraries/Maven__com_google_code_gson_gson_2_8_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..2343a7f --- /dev/null +++ b/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..7de6f07 --- /dev/null +++ b/.idea/libraries/Maven__com_google_guava_guava_25_0_jre.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..c06f999 --- /dev/null +++ b/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..0917a5b --- /dev/null +++ b/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_11_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..eb4535d --- /dev/null +++ b/.idea/libraries/Maven__com_squareup_okio_okio_1_14_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..5384f7a --- /dev/null +++ b/.idea/libraries/Maven__commons_codec_commons_codec_1_13.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..d722698 --- /dev/null +++ b/.idea/libraries/Maven__commons_io_commons_io_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..2ec8376 --- /dev/null +++ b/.idea/libraries/Maven__commons_lang_commons_lang_2_6.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..40327c1 --- /dev/null +++ b/.idea/libraries/Maven__dk_brics_automaton_automaton_1_11_8.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..77c9168 --- /dev/null +++ b/.idea/libraries/Maven__io_github_bonigarcia_webdrivermanager_5_0_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..606c352 --- /dev/null +++ b/.idea/libraries/Maven__junit_junit_4_13_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..c7e234c --- /dev/null +++ b/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_8_15.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..7e440f2 --- /dev/null +++ b/.idea/libraries/Maven__net_java_dev_jna_jna_5_8_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..49cd123 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_commons_commons_compress_1_21.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..e064a82 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_commons_commons_exec_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..666266c --- /dev/null +++ b/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_5.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..f1b986a --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_client5_httpclient5_5_0_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..450b1b0 --- /dev/null +++ b/.idea/libraries/Maven__org_apache_httpcomponents_core5_httpcore5_5_0_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..56cfc40 --- /dev/null +++ b/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_64.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..861cb28 --- /dev/null +++ b/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_64.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..2aade86 --- /dev/null +++ b/.idea/libraries/Maven__org_brotli_dec_0_1_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..29defe6 --- /dev/null +++ b/.idea/libraries/Maven__org_checkerframework_checker_compat_qual_2_0_0.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..1af11e4 --- /dev/null +++ b/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_14.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..f58bbc1 --- /dev/null +++ b/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..4655c4f --- /dev/null +++ b/.idea/libraries/Maven__org_jsoup_jsoup_1_14_2.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..ea95118 --- /dev/null +++ b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_api_3_141_59.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..aa7b6cb --- /dev/null +++ b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_chrome_driver_3_141_59.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..ecf2da2 --- /dev/null +++ b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_edge_driver_3_141_59.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..17f9a7c --- /dev/null +++ b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_firefox_driver_3_141_59.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..c4c9445 --- /dev/null +++ b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_ie_driver_3_141_59.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..bd12142 --- /dev/null +++ b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_java_3_141_59.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..e3736ac --- /dev/null +++ b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_opera_driver_3_141_59.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..b040848 --- /dev/null +++ b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_remote_driver_3_141_59.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..d7bd138 --- /dev/null +++ b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_safari_driver_3_141_59.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..20ef3da --- /dev/null +++ b/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_support_3_141_59.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..f92b959 --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_30.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..e5a84fb --- /dev/null +++ b/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_32.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ 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 new file mode 100644 index 0000000..374a800 --- /dev/null +++ b/.idea/libraries/Maven__org_yaml_snakeyaml_android_1_23.xml @@ -0,0 +1,13 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/.idea/misc.xml b/.idea/misc.xml new file mode 100644 index 0000000..80cd069 --- /dev/null +++ b/.idea/misc.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml new file mode 100644 index 0000000..fa6bed1 --- /dev/null +++ b/.idea/modules.xml @@ -0,0 +1,8 @@ + + + + + + + + \ No newline at end of file diff --git a/.idea/runConfigurations.xml b/.idea/runConfigurations.xml new file mode 100644 index 0000000..797acea --- /dev/null +++ b/.idea/runConfigurations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml index 7ea2385..77af0ee 100644 --- a/.idea/workspace.xml +++ b/.idea/workspace.xml @@ -4,7 +4,10 @@ + -<<<<<<< HEAD - -======= - ->>>>>>> c5e947795c64784b6f8923f5a6dc47ae7e297ed9 + \ No newline at end of file diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml deleted file mode 100644 index e96534f..0000000 --- a/.idea/uiDesigner.xml +++ /dev/null @@ -1,124 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 67f76cc..0000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,138 +0,0 @@ - - - - - -<<<<<<< HEAD - - - - - - - - -======= - ->>>>>>> c5e947795c64784b6f8923f5a6dc47ae7e297ed9 - -<<<<<<< HEAD - - - - - - - - \ No newline at end of file diff --git a/Configuration.properties b/Configuration.properties index e69de29..c01b88c 100644 --- a/Configuration.properties +++ b/Configuration.properties @@ -0,0 +1,2 @@ +browser=chrome +url=https://www.automationexercise.com/ \ No newline at end of file diff --git a/pom.xml b/pom.xml index 65d8d15..55ee4ad 100644 --- a/pom.xml +++ b/pom.xml @@ -55,8 +55,8 @@ https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java --> maven-compiler-plugin 3.8.1 - 12 - 12 + 11 + 11 diff --git a/src/test/java/pages/BrandPage.java b/src/test/java/pages/BrandPage.java new file mode 100644 index 0000000..090d440 --- /dev/null +++ b/src/test/java/pages/BrandPage.java @@ -0,0 +1,19 @@ +package pages; + +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import utilities.Driver; + +public class BrandPage { + + public BrandPage(){ + PageFactory.initElements(Driver.getDriver(),this); + } + + @FindBy(xpath="//div[@class='brands_products']") + public WebElement brands; + @FindBy(xpath="//div[@class='features_items']") + public WebElement brandProducts; + +} \ No newline at end of file diff --git a/src/test/java/pages/CartPage.java b/src/test/java/pages/CartPage.java new file mode 100644 index 0000000..83203e5 --- /dev/null +++ b/src/test/java/pages/CartPage.java @@ -0,0 +1,78 @@ +package pages; +import org.junit.Assert; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import utilities.Driver; +public class CartPage { + public CartPage(){ + PageFactory.initElements(Driver.getDriver(),this); + } + @FindBy(xpath ="//*[text()='Shopping Cart'] " ) + public WebElement cartPage ; + @FindBy(xpath ="//*[text()='Proceed To Checkout']" ) + public WebElement proceedToCheckout ; + @FindBy(xpath = "(//li[@class='address_address1 address_address2'])[2]" ) + public WebElement deliveryAddress; + @FindBy(xpath = "(//li[@class='address_address1 address_address2'])[5]" ) + public WebElement billingAddress; + @FindBy(xpath = "(//h2)[1]") + public WebElement addressDetails; + @FindBy(xpath = "(//h2)[2]") + public WebElement reviewOrder; + @FindBy(xpath ="(//a[@href='/login'])[2]" ) + public WebElement registerLogin; + @FindBy(name ="message") + public WebElement commentText; + @FindBy(xpath = "//*[@href='/payment']") + public WebElement placeOrder; + @FindBy(name = "name_on_card") + public WebElement nameOnCard; + @FindBy(name ="card_number") + public WebElement cardNumber; + @FindBy(xpath = "//*[@name='cvc']") + public WebElement cvs; + @FindBy(name ="expiry_month") + public WebElement expiryMonth; + @FindBy(name ="expiry_year") + public WebElement expiryYear; + @FindBy(id ="submit") + public WebElement payAndConfirmOrder; + @FindBy(xpath ="//*[contains(text(),'Your order has been')]") + public WebElement successMessage; + @FindBy(xpath = "//a[@href='/download_invoice/500']") + public WebElement downlandInvoiceButton; + @FindBy (xpath = "//a[@data-qa='continue-button']" ) + public WebElement continueButton; + + @FindBy(xpath = "//input[@id='susbscribe_email']") + public WebElement subscriptionEmail; + + @FindBy(linkText = "Blue Top") + public WebElement product1; + + @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 new file mode 100644 index 0000000..7673daf --- /dev/null +++ b/src/test/java/pages/ContactUsPage.java @@ -0,0 +1,29 @@ +package pages; + +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import utilities.Driver; + +public class ContactUsPage { + public ContactUsPage() { + PageFactory.initElements(Driver.getDriver(), this); + } + @FindBy(xpath = "(//h2)[2]") + public WebElement getInTouchText ; + + @FindBy(name = "name") + public WebElement nameText; + @ FindBy(name="email") + public WebElement email; + @ FindBy(name="subject") + public WebElement subject; + @ FindBy(name="message") + public WebElement message; + @ FindBy(name="upload_file") + public WebElement uploadFile; + @ FindBy(name="submit") + public WebElement submit; + @ FindBy(xpath= "//*[text()='Success! Your details have been submitted successfully.']") + public WebElement successMessage; +} \ No newline at end of file diff --git a/src/test/java/pages/HomePage.java b/src/test/java/pages/HomePage.java new file mode 100644 index 0000000..6efc712 --- /dev/null +++ b/src/test/java/pages/HomePage.java @@ -0,0 +1,73 @@ +package pages; + +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import utilities.Driver; + +public class HomePage { + public HomePage() { + PageFactory.initElements(Driver.getDriver(), this); + } + + @FindBy(xpath = "//div[@class='logo pull-left']") + public WebElement automationExerciseText; + + + @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 = "//i[@class='material-icons card_travel']") + public WebElement productButton; + + @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 = "//*[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 = "//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; +} + + diff --git a/src/test/java/pages/ProductPage.java b/src/test/java/pages/ProductPage.java new file mode 100644 index 0000000..6ad4fda --- /dev/null +++ b/src/test/java/pages/ProductPage.java @@ -0,0 +1,78 @@ +package pages; + +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import utilities.Driver; + +public class ProductPage { + + public ProductPage() { + PageFactory.initElements(Driver.getDriver(), this); + } + + @FindBy(xpath = "//*[.='All Products']") + public WebElement allProductsHead; + @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']") + public WebElement productReview; + @FindBy(xpath = "//input[@id='name']") + public WebElement nameBox; + @FindBy(xpath = "//input[@id='email']") + public WebElement emailBox; + @FindBy(xpath = "//textarea[@id='review']") + public WebElement reviewArea; + @FindBy(xpath = "//button[@id='button-review']") + public WebElement submitButton; + @FindBy(xpath = "//div[@class='alert-success alert']") + public WebElement successMessage; + + + @FindBy(xpath = "(//li)[2]") + public WebElement products; + + @FindBy(xpath = "//h2[contains(text(),'All Products')]") + public WebElement allProductsText; + + @FindBy(xpath = "//input[@class= 'form-control input-lg']") + public WebElement searchBox; + + @FindBy(xpath = "//i[@class= 'fa fa-search']") + public WebElement searchButton; + + @FindBy(xpath = "//h2[contains(text(),'Searched Products')]") + public WebElement searchedProducts; + + + @FindBy(xpath = "//div[@class='product-image-wrapper']") + public WebElement allProducts; + + @FindBy(xpath = "//img[@src='/get_product_picture/1']") + public WebElement productPicture1; + + @FindBy(xpath = "(//i[@class='fa fa-shopping-cart'])[2]") + public WebElement addToCart; + + @FindBy(xpath = "//button[@class='btn btn-success close-modal btn-block']") + public WebElement continueShopping; + + @FindBy(xpath = "//img[@src='/get_product_picture/2']") + public WebElement productPicture2; + + @FindBy(xpath = "//a[@data-product-id='2']") + public WebElement addToCart2; + + @FindBy(xpath = " //p[@class='text-center']//a") + public WebElement viewCart; + + @FindBy(xpath="//input[@id='search_product']") + public WebElement searchProduct; + @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 new file mode 100644 index 0000000..8b120b1 --- /dev/null +++ b/src/test/java/pages/SignInPage.java @@ -0,0 +1,59 @@ +package pages; +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import utilities.Driver; +public class SignInPage { + public SignInPage() { + PageFactory.initElements(Driver.getDriver(), this); + } + //Verify that 'ENTER ACCOUNT INFORMATION' is visible + @FindBy(xpath = "(//b)[1]") + public WebElement enterAccount; + // Fill details: Title, Name, Email, Password, Date of birth + @FindBy(id = "uniform-id_gender2") + public WebElement genderCheckBox; + @FindBy(id = "name") + public WebElement name; + @FindBy(id = "email") + public WebElement email; + @FindBy(id = "password") + public WebElement password; + // Selecting birth day + @FindBy(id = "days") + public WebElement day; + @FindBy(id = "months") + public WebElement month; + @FindBy(id = "years") + public WebElement year; + @FindBy(id = "newsletter") + public WebElement newsletter; + @FindBy(id = "optin") + public WebElement receiveOffers; + @FindBy(id = "first_name") + public WebElement firstname; + @FindBy(id = "last_name") + public WebElement lastname; + @FindBy(id = "company") + public WebElement company; + @FindBy(id = "address1") + public WebElement address1; + @FindBy(id = "address2") + public WebElement address2; + @FindBy(id = "country") + public WebElement country; + @FindBy(id = "city") + public WebElement city; + @FindBy(id = "state") + public WebElement state; + @FindBy(id = "zipcode") + public WebElement zipcode; + @FindBy(id = "mobile_number") + public WebElement mobileNumber; + @FindBy(xpath = "//button[@data-qa='create-account']") + public WebElement createAccount; + @FindBy(xpath = "//b") + 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 new file mode 100644 index 0000000..b52a8db --- /dev/null +++ b/src/test/java/pages/SignUpLoginPage.java @@ -0,0 +1,35 @@ +package pages; + +import org.openqa.selenium.WebElement; +import org.openqa.selenium.support.FindBy; +import org.openqa.selenium.support.PageFactory; +import utilities.Driver; + +public class SignUpLoginPage { + public SignUpLoginPage() { + PageFactory.initElements(Driver.getDriver(), this); + } + + @FindBy(xpath = "(//h2)[3]") + public WebElement newUserSignUpText; + @FindBy(name = "name") + public WebElement signUpName; + @FindBy(xpath = "(//input[@name='email'])[2]") + public WebElement signUpEmail; + @FindBy(xpath = "//button[@data-qa='signup-button']") + public WebElement signInButton; + @FindBy(xpath = "(//input[@name= 'email'])[1]") + public WebElement loginEmail; + @FindBy(xpath = "//input[@name= 'password']") + public WebElement loginPassword; + @FindBy(xpath = "//button[text()= 'Login']") + 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/pages/TC17_SerpilMPage.java b/src/test/java/pages/TC17_SerpilMPage.java deleted file mode 100644 index 48eb04f..0000000 --- a/src/test/java/pages/TC17_SerpilMPage.java +++ /dev/null @@ -1,44 +0,0 @@ -package pages; - -import io.cucumber.java.en.Given; -import io.cucumber.java.en.Then; -import io.cucumber.java.en.When; - -public class TC17_SerpilMPage { - - @Given("User launches browser") - public void user_opens_automationpractice_web_page() { - - } - - @When("User navigates to url http://automationexercise.com") - public void user_naviagates_to_url() { - - } - - @When("User verifies home page is visible successfully") - public void user_verifies_home_page_visible() { - - } - - @Then("User adds products to cart") - public void test_user_adds_products_to_cart() { - - } - @Then("User clicks cart button") - public void test_user_clicks_cart_button() { - - } - @Then("User verifies the cart page is displayed") - public void test_user_verifies_cart_page_displayed() { - - } - @When("User clicks 'X' button corresponding to particular product") - public void test_user_clicks_X_button() { - - } - @Then("User verifies that product is removed from the cart") - public void test_user_verifies_product_removed() { - - } -} diff --git a/src/test/java/pages/TC18_SerpilMPage.java b/src/test/java/pages/TC18_SerpilMPage.java deleted file mode 100644 index 28087b4..0000000 --- a/src/test/java/pages/TC18_SerpilMPage.java +++ /dev/null @@ -1,4 +0,0 @@ -package pages; - -public class TC18_SerpilMPage { -} diff --git a/src/test/java/tests/TC001_tests.java b/src/test/java/tests/TC001_tests.java deleted file mode 100644 index 996c45c..0000000 --- a/src/test/java/tests/TC001_tests.java +++ /dev/null @@ -1,4 +0,0 @@ -package tests; - -public class TC001_tests { -} diff --git a/src/test/java/tests/TC03_EsraM.java b/src/test/java/tests/TC03_EsraM.java new file mode 100644 index 0000000..d3dd3c3 --- /dev/null +++ b/src/test/java/tests/TC03_EsraM.java @@ -0,0 +1,53 @@ +package tests; + +import com.github.javafaker.Faker; +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import pages.HomePage; +import pages.SignUpLoginPage; +import utilities.ConfigurationReader; +import utilities.Driver; + + +public class TC03_EsraM { + HomePage homePage; + SignUpLoginPage signUpLoginPage; + + + //Launch browser + //2. Navigate to url 'http://automationexercise.com' + //3. Verify that home page is visible successfully + //4. Click on 'Signup / Login' button + //5. Verify 'Login to your account' is visible + //6. Enter incorrect email address and password + //7. Click 'login' button + //8. Verify error 'Your email or password is incorrect!' is visible + + + @Test + public void loginWithInvalidCredentials() { + + + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + Assert.assertEquals("Automation Exercise", Driver.getDriver().getTitle()); + homePage = new HomePage(); + Assert.assertTrue(homePage.signUpLogin.isDisplayed()); + homePage.signUpLogin.click(); + signUpLoginPage = new SignUpLoginPage(); + Assert.assertEquals("Login to your account", signUpLoginPage.loginMessage.getText()); + + +// Login with invalid password + + + signUpLoginPage.loginEmail.sendKeys("flower@hotmail.com"); + signUpLoginPage.loginPassword.sendKeys("flowers"); + signUpLoginPage.loginButton.click(); + System.out.println(signUpLoginPage.incorrectEmail.getText()); + Assert.assertEquals("Your email or password is incorrect!", signUpLoginPage.incorrectEmail.getText()); + + Driver.getDriver().close(); + } +} \ No newline at end of file diff --git a/src/test/java/tests/TC04_EsraM.java b/src/test/java/tests/TC04_EsraM.java new file mode 100644 index 0000000..7783f8a --- /dev/null +++ b/src/test/java/tests/TC04_EsraM.java @@ -0,0 +1,58 @@ +package tests; + +import org.junit.Assert; +import org.junit.Test; +import pages.HomePage; +import pages.SignUpLoginPage; +import utilities.ConfigurationReader; +import utilities.Driver; + +public class TC04_EsraM { + + HomePage homePage; + SignUpLoginPage signUpLoginPage; + + + @Test + + /* Launch browser + Navigate to url 'http://automationexercise.com' + Verify that home page is visible successfully + Click on 'Signup / Login' button + Verify 'Login to your account' is visible + Enter correct email address and password + Click 'login' button + Verify that 'Logged in as username' is visible + Click 'Logout' button + Verify that user is navigated to login page */ + + public void LogoutUser() { + + // Launch browser Navigate to url 'http://automationexercise.com'Verify that home page is visible successfully + + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + Assert.assertEquals("Automation Exercise", Driver.getDriver().getTitle()); + + homePage = new HomePage(); + Assert.assertTrue(homePage.signUpLogin.isDisplayed()); + homePage.signUpLogin.click(); + + +// Verify 'Login to your account' is visible + signUpLoginPage = new SignUpLoginPage(); + Assert.assertEquals("Login to your account", signUpLoginPage.loginMessage.getText()); + +// Login with invalid password + signUpLoginPage.loginEmail.sendKeys("flowers@hotmail.com"); + signUpLoginPage.loginPassword.sendKeys("flowers"); + signUpLoginPage.loginButton.click(); + +// Verify that 'Logged in as username' is visible + Assert.assertEquals("Logged in as flowers", signUpLoginPage.loggedInAsMessage.getText()); + +// Click 'Logout' button / Verify that user is navigated to login page + signUpLoginPage.logOutbutton.click(); + Assert.assertEquals("Login to your account", signUpLoginPage.loginMessage.getText()); + + } +} diff --git a/src/test/java/tests/TC09_EsraItest.java b/src/test/java/tests/TC09_EsraItest.java new file mode 100644 index 0000000..e9506b8 --- /dev/null +++ b/src/test/java/tests/TC09_EsraItest.java @@ -0,0 +1,93 @@ +package tests; + + +import org.junit.After; +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; +import pages.HomePage; +import pages.ProductPage; +import utilities.ConfigurationReader; +import utilities.Driver; +import utilities.ReusableMethods; + +import java.util.ArrayList; +import java.util.List; + + +public class TC09_EsraItest{ +/* + 1. Launch browser + 2. Navigate to url 'http://automationexercise.com' + 3. Verify that home page is visible successfully + 4. Click on 'Products' button + 5. Verify user is navigated to ALL PRODUCTS page successfully + 6. Enter product name in search input and click search button + 7. Verify 'SEARCHED PRODUCTS' is visible + 8. Verify all the products related to search are visible + */ + + HomePage homePage; + ProductPage productPage; + + @Test + public void SearchProduct() { + homePage = new HomePage(); + productPage = new ProductPage(); + + //Navigate to url 'http://automationexercise.com' + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + + // Verify that home page is visible successfully + Assert.assertEquals("Automation Exercise", Driver.getDriver().getTitle()); + ReusableMethods.verifyElementDisplayed(homePage.automationExerciseText); + + //Click on 'Products' button + productPage.products.click(); + + // Verify user is navigated to ALL PRODUCTS page successfully + ReusableMethods.verifyElementDisplayed( productPage.allProductsText); + + // Enter product name in search input and click search button + productPage.searchBox.sendKeys("Blue Top"); + productPage.searchButton.click(); + + //Verify 'SEARCHED PRODUCTS' is visible + ReusableMethods.verifyElementDisplayed( productPage.searchedProducts); + Driver.getDriver().navigate().back(); + + + + //Verify all the products related to search are visible + ReusableMethods.verifyElementDisplayed(productPage.allProducts); + Assert.assertTrue(productPage.allProducts.isDisplayed()); + + + List productList = Driver.getDriver().findElements(By.xpath("//div[@class='product-image-wrapper']")); + System.out.println(productList.size()); + + List allProductList= new ArrayList<>(); + List allProductsHas = new ArrayList<>(); + for (WebElement eachPrice : productList) { + allProductList.add(eachPrice.getText()); + allProductsHas.add(eachPrice.getText()); + } + + System.out.println("All products are visible!!! " + "\n" + allProductList); + Assert.assertEquals(allProductList,allProductsHas); + + } + + + + @After + public void tearDown() { + Driver.getDriver().close(); + + + } + + + +} diff --git a/src/test/java/tests/TC10_EsraItest.java b/src/test/java/tests/TC10_EsraItest.java new file mode 100644 index 0000000..324fe6d --- /dev/null +++ b/src/test/java/tests/TC10_EsraItest.java @@ -0,0 +1,60 @@ +package tests; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.Keys; +import org.openqa.selenium.interactions.Actions; +import pages.HomePage; +import pages.ProductPage; +import utilities.ConfigurationReader; +import utilities.Driver; +import utilities.JSUtils; +import utilities.ReusableMethods; + +public class TC10_EsraItest { + + /* + 1. Launch browser + 2. Navigate to url 'http://automationexercise.com' + 3. Verify that home page is visible successfully + 4. Scroll down to footer + 5. Verify text 'SUBSCRIPTION' + 6. Enter email address in input and click arrow button + 7. Verify success message 'You have been successfully subscribed!' is visible + */ + HomePage homePage; + ProductPage productPage; + + @Test + public void VerifySubscriptionInHomePage() { + homePage = new HomePage(); + productPage = new ProductPage(); + + //Navigate to url 'http://automationexercise.com' + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + + + //Verify that home page is visible successfully + Assert.assertEquals("Automation Exercise", Driver.getDriver().getTitle()); + ReusableMethods.verifyElementDisplayed(homePage.automationExerciseText); + + + //Scroll down to footer + JSUtils.scrollDownByJS(); + ReusableMethods.waitFor(2); + + + //Verify text 'SUBSCRIPTION' + ReusableMethods.verifyElementDisplayed(homePage.subscriptionText); + + //Enter email address in input and click arrow button + homePage.emailTextBox.sendKeys("ghhh@gmail.com"); + homePage.arrowButton.click(); + + //Verify success message 'You have been successfully subscribed!' is visible + ReusableMethods.waitFor(1); + ReusableMethods.verifyElementDisplayed(homePage.successMessage); + + + } +} diff --git a/src/test/java/tests/TC11_VerifySubscriptionInCartPage.java b/src/test/java/tests/TC11_VerifySubscriptionInCartPage.java new file mode 100644 index 0000000..e50d961 --- /dev/null +++ b/src/test/java/tests/TC11_VerifySubscriptionInCartPage.java @@ -0,0 +1,47 @@ +package tests; + +import org.junit.Assert; +import org.junit.Test; +import pages.HomePage; +import utilities.ConfigurationReader; +import utilities.Driver; +import utilities.JSUtils; +import utilities.ReusableMethods; + +public class TC11_VerifySubscriptionInCartPage { + + HomePage homePage; + + @Test + public void verifySubscriptionInCartPage(){ + + //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(); + + //Click 'Cart' button + homePage.cartButton.click(); + + //Scroll down to Subscription text + JSUtils.scrollIntoViewJS(homePage.subscriptionText); + ReusableMethods.waitFor(2); + + //Verify text 'SUBSCRIPTION' + Assert.assertTrue(homePage.subscriptionText.isDisplayed()); + + + //Enter email address in email input box and click arrow button + homePage.emailTextBox.sendKeys("test@gmail.com"); + homePage.arrowButton.click(); + + //Verify success message 'You have been successfully subscribed!' is visible + ReusableMethods.waitFor(1); + Assert.assertTrue(homePage.successMessage.isDisplayed()); + } +} diff --git a/src/test/java/tests/TC12_AddProductsInCart.java b/src/test/java/tests/TC12_AddProductsInCart.java new file mode 100644 index 0000000..d0a8d84 --- /dev/null +++ b/src/test/java/tests/TC12_AddProductsInCart.java @@ -0,0 +1,79 @@ +package tests; + +import org.junit.Assert; +import org.junit.Test; +import org.openqa.selenium.Keys; +import org.openqa.selenium.interactions.Actions; +import pages.CartPage; +import pages.HomePage; +import pages.ProductPage; +import utilities.ConfigurationReader; +import utilities.Driver; +import utilities.ReusableMethods; + +public class TC12_AddProductsInCart { + + HomePage homePage; + ProductPage productPage; + CartPage cartPage; + + @Test + public void addProductsInCart(){ + + //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.productButton.click(); + + productPage = new ProductPage(); + + + Actions action1 = new Actions(Driver.getDriver()); + ReusableMethods.waitFor(2); + action1.moveToElement(productPage.productPicture1).build().perform(); + action1.sendKeys(Keys.PAGE_DOWN).perform(); + ReusableMethods.waitFor(2); + productPage.addToCart.click(); + productPage.continueShopping.click(); + + Actions action2 = new Actions(Driver.getDriver()); + action2.moveToElement(productPage.productPicture2).build().perform(); + productPage.addToCart2.click(); + + + productPage.viewCart.click(); + + cartPage = new CartPage(); + + + Assert.assertTrue(cartPage.product1.isDisplayed()); + + Assert.assertTrue(cartPage.product2.isDisplayed()); + + Assert.assertEquals("Rs. 500", cartPage.product_1_Price.getText()); + + Assert.assertEquals("Rs. 400", cartPage.product_2_Price.getText()); + + Assert.assertEquals("1", cartPage.product_1_Quantity.getText()); + + Assert.assertEquals("1", cartPage.product_2_Quantity.getText()); + + Assert.assertEquals("Rs. 500",cartPage.product_1_TotalPrice.getText()); + + Assert.assertEquals("Rs. 400",cartPage.product_2_TotalPrice.getText()); + + + + + + + + } +} diff --git a/src/test/java/tests/TC19_SuhedaY.java b/src/test/java/tests/TC19_SuhedaY.java new file mode 100644 index 0000000..7f3154d --- /dev/null +++ b/src/test/java/tests/TC19_SuhedaY.java @@ -0,0 +1,87 @@ +package tests; + +import org.junit.After; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.openqa.selenium.By; +import org.openqa.selenium.WebElement; + +import pages.BrandPage; +import pages.HomePage; +import utilities.ConfigurationReader; +import utilities.Driver; + +import java.util.List; +import java.util.Random; +import java.util.concurrent.TimeUnit; + +public class TC19_SuhedaY { + + HomePage homePage=new HomePage(); + BrandPage brandPage=new BrandPage(); + + @Before + public void setUp(){ + Driver.getDriver().get(ConfigurationReader.getProperty("url")); + Driver.getDriver().manage().window().maximize(); + Driver.getDriver().manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS); + } + + @Test + public void test() { + //Click on 'Products' button + homePage.productButton.click(); + // brandPage.products.click(); + + //Verify that Brands are visible on left side bar + Assert.assertTrue(brandPage.brands.isDisplayed()); + /**if(brandPage.brands.isDisplayed()){ + System.out.println("Element is visible"); + }else{ + System.out.println("Element is invisible"); + }*/ + + //Click on any brand name + List allBrands=Driver.getDriver().findElements(By.xpath("//div[@class='brands-name']//li")); + //* get the length of total brands + int totalSize=allBrands.size(); + //* get random number + Random random=new Random(); + int randomBrand=random.nextInt(totalSize); + //* select the list item + allBrands.get(randomBrand).click(); + + //Verify that user is navigated to brand page and brand products are displayed + String title1=Driver.getDriver().getTitle(); + if(title1!="Automation Exercise - All Products"){ + System.out.println("User is navigated to brand page"); + }else{ + System.out.println("User is not navigated to brand page"); + } + //*Verify that brand products are displayed + Assert.assertTrue(brandPage.brandProducts.isDisplayed()); + + //On left side bar, click on any other brand link + List allBrands2=Driver.getDriver().findElements(By.xpath("//div[@class='brands-name']//li")); + int totalSize2=allBrands2.size(); + Random random2=new Random(); + int randomBrand2=random.nextInt(totalSize2); + allBrands2.get(randomBrand2).click(); + + //Verify that user is navigated to that brand page and can see products + String title2=Driver.getDriver().getTitle(); + if(title2!=title1){ + System.out.println("User is navigated to other brand page"); + }else{ + System.out.println("User is not navigated to other brand page"); + } + + } + + @After + public void tearDown(){ + // driver.close(); + } + +} \ No newline at end of file diff --git a/src/test/java/utilities/JSUtils.java b/src/test/java/utilities/JSUtils.java new file mode 100644 index 0000000..23faec1 --- /dev/null +++ b/src/test/java/utilities/JSUtils.java @@ -0,0 +1,68 @@ +package utilities; + + +import org.openqa.selenium.JavascriptExecutor; +import org.openqa.selenium.WebElement; + +public class JSUtils { + //This method will takes two parameter: WebElement, and WebDriver + //When you pass the element, JS will click on that element + public static void clickElementByJS(WebElement element) { + // javascript executor click + JavascriptExecutor jsexecutor = ((JavascriptExecutor) Driver.getDriver()); + jsexecutor.executeScript("arguments[0].click();", element); + } + //to get the page title with JS + public static String getTitleByJS() { + JavascriptExecutor jsexecutor = ((JavascriptExecutor) Driver.getDriver()); + String title = jsexecutor.executeScript("return document.title;").toString(); + return title; + } + //Scrolling all the way down + public static void scrollDownByJS() { + JavascriptExecutor jsexecutor = ((JavascriptExecutor) Driver.getDriver()); + jsexecutor.executeScript("window.scrollTo(0,document.body.scrollHeight)"); + } + //Scroll into view with JS. THIS IS VERY USEFULL + public static void scrollIntoViewJS(WebElement element) { + JavascriptExecutor jsexecutor = ((JavascriptExecutor) Driver.getDriver()); + jsexecutor.executeScript("arguments[0].scrollIntoView(true);", element); + } + public static void changeColor(String color, WebElement element) { + JavascriptExecutor javascriptExecutor = ((JavascriptExecutor) Driver.getDriver()); + javascriptExecutor.executeScript("arguments[0].style.backgroundColor = '" + color + "'", element); + try { + Thread.sleep(5000); + } catch (InterruptedException e) { + e.printStackTrace(); + } + } + //Flashing teh background color + public static void flash(WebElement element) { + String bgColor = element.getCssValue("backgroundcolor"); + for (int i = 0; i < 5; i++) { + changeColor("rgb(0,200,0", element); + changeColor(bgColor, element); + } + } + //this willg enerate an alert when needed + public static void generateAlert(String message) throws InterruptedException { + JavascriptExecutor javascriptExecutor = ((JavascriptExecutor) Driver.getDriver()); + javascriptExecutor.executeScript("alert('" + message + "')"); + Thread.sleep(3000); + } + /* + * executes the given JavaScript command on given web element + */ + public static void executeJScommand(WebElement element, String command) { + JavascriptExecutor jse = (JavascriptExecutor) Driver.getDriver(); + jse.executeScript(command, element); + } + /* + * executes the given JavaScript command on given web element + */ + public static void executeJScommand(String command) { + JavascriptExecutor jse = (JavascriptExecutor) Driver.getDriver(); + jse.executeScript(command); + } +} diff --git a/src/test/java/utilities/ReusableMethods.java b/src/test/java/utilities/ReusableMethods.java index f5c0699..74101b4 100644 --- a/src/test/java/utilities/ReusableMethods.java +++ b/src/test/java/utilities/ReusableMethods.java @@ -1,24 +1,40 @@ package utilities; +import org.apache.commons.io.FileUtils; import org.junit.Assert; -import org.openqa.selenium.By; -import org.openqa.selenium.JavascriptExecutor; -import org.openqa.selenium.WebDriver; -import org.openqa.selenium.WebElement; +import org.openqa.selenium.*; import org.openqa.selenium.interactions.Actions; import org.openqa.selenium.support.ui.ExpectedCondition; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait; +import java.io.File; +import java.io.IOException; +import java.text.SimpleDateFormat; import java.util.ArrayList; +import java.util.Date; import java.util.List; import java.util.NoSuchElementException; public class ReusableMethods { + public static String getScreenshot(String name) throws IOException { + // naming the screenshot with the current date to avoid duplication + String date = new SimpleDateFormat("yyyyMMddhhmmss").format(new Date()); // do not change the format of the date!! + // TakesScreenshot is an interface of selenium that takes the screenshot + TakesScreenshot ts = (TakesScreenshot) Driver.getDriver(); + File source = ts.getScreenshotAs(OutputType.FILE); + // full path to the screenshot location + String target = System.getProperty("user.dir") + "/test-output/Screenshots/" + name + date + ".png"; + File finalDestination = new File(target); + // save the screenshot to the path given + FileUtils.copyFile(source, finalDestination); + return target; + } + public static WebElement waitForVisibility(WebElement element, int timeToWaitInSec) { WebDriverWait wait = new WebDriverWait(Driver.getDriver(), timeToWaitInSec); return wait.until(ExpectedConditions.visibilityOf(element)); From 5313e300780051fa4a1545023264102f46075f47 Mon Sep 17 00:00:00 2001 From: Rose Date: Wed, 9 Feb 2022 00:17:17 -0600 Subject: [PATCH 6/8] ... --- .idea/vcs.xml | 4 -- src/test/java/pages/CartPage.java | 35 ++---------- src/test/java/pages/HomePage.java | 60 +++++++------------- src/test/java/tests/Test17_SerpilMTest.java | 40 +++++++++++++ src/test/java/tests/Tests18_SerpilMTest.java | 42 +++++++++++++- 5 files changed, 108 insertions(+), 73 deletions(-) diff --git a/.idea/vcs.xml b/.idea/vcs.xml index 4a62bb2..94a25f7 100644 --- a/.idea/vcs.xml +++ b/.idea/vcs.xml @@ -1,10 +1,6 @@ -<<<<<<< HEAD - -======= ->>>>>>> c5e947795c64784b6f8923f5a6dc47ae7e297ed9 \ No newline at end of file diff --git a/src/test/java/pages/CartPage.java b/src/test/java/pages/CartPage.java index 83203e5..e4cf450 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,6 @@ 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(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/HomePage.java b/src/test/java/pages/HomePage.java index 6efc712..482d6ad 100644 --- a/src/test/java/pages/HomePage.java +++ b/src/test/java/pages/HomePage.java @@ -4,70 +4,52 @@ import org.openqa.selenium.support.FindBy; import org.openqa.selenium.support.PageFactory; import utilities.Driver; - 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]") public WebElement loggedUsername; - - @FindBy(xpath = "//i[@class='material-icons card_travel']") - public WebElement productButton; - @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]") + @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 = "//*[contains(text(),'recommended')]") + @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')]") + // @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; - - - @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; } diff --git a/src/test/java/tests/Test17_SerpilMTest.java b/src/test/java/tests/Test17_SerpilMTest.java index 58f8b5e..1932103 100644 --- a/src/test/java/tests/Test17_SerpilMTest.java +++ b/src/test/java/tests/Test17_SerpilMTest.java @@ -1,4 +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 index d0398e6..76c0937 100644 --- a/src/test/java/tests/Tests18_SerpilMTest.java +++ b/src/test/java/tests/Tests18_SerpilMTest.java @@ -1,4 +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(); + + // 8. Verify that user is navigated to that category page + homePage.menPlusSign.click(); + Assert.assertTrue(homePage.menTshirt.isDisplayed()); + } +} \ No newline at end of file From bcbe946709e34f1bc2a881124e3e7f496a667242 Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 10 Feb 2022 12:35:39 -0600 Subject: [PATCH 7/8] updating .gitignore --- src/test/java/tests/Tests18_SerpilMTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/test/java/tests/Tests18_SerpilMTest.java b/src/test/java/tests/Tests18_SerpilMTest.java index 76c0937..a2a482a 100644 --- a/src/test/java/tests/Tests18_SerpilMTest.java +++ b/src/test/java/tests/Tests18_SerpilMTest.java @@ -36,7 +36,7 @@ public void test1() throws InterruptedException { // 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()); From b96fa3ce791a0cc413b7b8411df9f209e9de12c8 Mon Sep 17 00:00:00 2001 From: Rose Date: Thu, 10 Feb 2022 12:40:55 -0600 Subject: [PATCH 8/8] my changes --- .idea/compiler.xml | 3 - .idea/jarRepositories.xml | 20 ---- .idea/mavenExecutorSetting.xml | 24 ++++ .idea/misc.xml | 4 + .idea/modules.xml | 8 -- Configuration.properties | 7 +- src/test/java/pages/CartPage.java | 3 + src/test/java/pages/ContactUsPage.java | 5 +- src/test/java/pages/HomePage.java | 82 +++++++++++++ src/test/java/pages/ProductPage.java | 25 ++-- src/test/java/pages/SignInPage.java | 3 +- src/test/java/pages/SignUpLoginPage.java | 4 + src/test/java/tests/TC001_tests.java | 5 + .../java/tests/TC12_AddProductsInCart.java | 6 - src/test/java/tests/TC13_DemetA.java | 42 +++++++ src/test/java/tests/TC14_DemetA.java | 26 +++++ src/test/java/tests/TC15_AslanY.java | 34 ++++++ src/test/java/tests/TC20_SuhedaY.java | 108 ++++++++++++++++++ src/test/java/tests/TC21_HaticeC.java | 50 ++++++++ src/test/java/tests/TC22_HaticeC.java | 38 ++++++ 20 files changed, 443 insertions(+), 54 deletions(-) delete mode 100644 .idea/jarRepositories.xml create mode 100644 .idea/mavenExecutorSetting.xml delete mode 100644 .idea/modules.xml create mode 100644 src/test/java/tests/TC001_tests.java create mode 100644 src/test/java/tests/TC13_DemetA.java create mode 100644 src/test/java/tests/TC14_DemetA.java create mode 100644 src/test/java/tests/TC15_AslanY.java create mode 100644 src/test/java/tests/TC20_SuhedaY.java create mode 100644 src/test/java/tests/TC21_HaticeC.java create mode 100644 src/test/java/tests/TC22_HaticeC.java 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/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 17e19eb..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 e4cf450..fa04568 100644 --- a/src/test/java/pages/CartPage.java +++ b/src/test/java/pages/CartPage.java @@ -52,4 +52,7 @@ public CartPage(){ } + @FindBy (xpath = "//table[@id='cart_info_table']/tbody" ) + public WebElement orderTable; + 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 482d6ad..9591137 100644 --- a/src/test/java/pages/HomePage.java +++ b/src/test/java/pages/HomePage.java @@ -1,9 +1,16 @@ 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; +<<<<<<< HEAD public class HomePage { public HomePage(){ PageFactory.initElements(Driver.getDriver(),this); @@ -50,6 +57,81 @@ public HomePage(){ @FindBy(xpath = "//*[contains(text(), 'Tshirts')]") public WebElement menTshirt; +======= + + public class HomePage { + public HomePage(){ + PageFactory.initElements(Driver.getDriver(),this); + } + + @FindBy(xpath = "//div[@class='logo pull-left']") + public WebElement automationExerciseText; + + + @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 = "//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 = "//*[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 6ad4fda..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; @@ -72,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(); + } +}