├── .editorconfig
├── .gitignore
├── .gradle
├── 6.7
│ ├── fileChanges
│ │ └── last-build.bin
│ ├── fileHashes
│ │ └── fileHashes.lock
│ └── gc.properties
├── buildOutputCleanup
│ ├── buildOutputCleanup.lock
│ └── cache.properties
├── checksums
│ └── checksums.lock
├── configuration-cache
│ └── gc.properties
└── vcs-1
│ └── gc.properties
├── .idea
├── .name
├── checkstyle-idea.xml
├── compiler.xml
├── jarRepositories.xml
├── libraries
│ ├── Maven__aopalliance_aopalliance_1_0.xml
│ ├── Maven__com_beust_jcommander_1_78.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_annotations_2_8_9.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_core_2_8_9.xml
│ ├── Maven__com_fasterxml_jackson_core_jackson_databind_2_8_9.xml
│ ├── Maven__com_google_code_findbugs_jsr305_1_3_9.xml
│ ├── Maven__com_google_code_gson_gson_2_8_6.xml
│ ├── Maven__com_google_errorprone_error_prone_annotations_2_1_3.xml
│ ├── Maven__com_google_guava_guava_25_0_jre.xml
│ ├── Maven__com_google_inject_guice_no_aop_4_2_2.xml
│ ├── Maven__com_google_j2objc_j2objc_annotations_1_1.xml
│ ├── Maven__com_jcraft_jzlib_1_1_3.xml
│ ├── Maven__com_squareup_okhttp3_okhttp_3_11_0.xml
│ ├── Maven__com_squareup_okio_okio_1_14_0.xml
│ ├── Maven__commons_codec_commons_codec_1_13.xml
│ ├── Maven__commons_io_commons_io_2_8_0.xml
│ ├── Maven__dnsjava_dnsjava_2_1_8.xml
│ ├── Maven__io_github_bonigarcia_webdrivermanager_4_2_2.xml
│ ├── Maven__io_netty_netty_all_4_0_51_Final.xml
│ ├── Maven__javax_inject_javax_inject_1.xml
│ ├── Maven__junit_junit_4_12.xml
│ ├── Maven__net_bytebuddy_byte_buddy_1_8_15.xml
│ ├── Maven__net_lightbody_bmp_browsermob_core_2_1_5.xml
│ ├── Maven__net_lightbody_bmp_littleproxy_1_1_0_beta_bmp_17.xml
│ ├── Maven__net_lightbody_bmp_mitm_2_1_5.xml
│ ├── Maven__net_sf_jopt_simple_jopt_simple_4_6.xml
│ ├── Maven__org_apache_ant_ant_1_10_3.xml
│ ├── Maven__org_apache_ant_ant_launcher_1_10_3.xml
│ ├── Maven__org_apache_commons_commons_compress_1_20.xml
│ ├── Maven__org_apache_commons_commons_exec_1_3.xml
│ ├── Maven__org_apache_commons_commons_lang3_3_11.xml
│ ├── Maven__org_apache_commons_commons_math3_3_2.xml
│ ├── Maven__org_apache_httpcomponents_client5_httpclient5_5_0_1.xml
│ ├── Maven__org_apache_httpcomponents_core5_httpcore5_5_0_1.xml
│ ├── Maven__org_apache_httpcomponents_core5_httpcore5_h2_5_0_1.xml
│ ├── Maven__org_bouncycastle_bcpkix_jdk15on_1_58.xml
│ ├── Maven__org_bouncycastle_bcprov_jdk15on_1_58.xml
│ ├── Maven__org_checkerframework_checker_compat_qual_2_0_0.xml
│ ├── Maven__org_codehaus_mojo_animal_sniffer_annotations_1_14.xml
│ ├── Maven__org_hamcrest_hamcrest_core_1_3.xml
│ ├── Maven__org_jsoup_jsoup_1_13_1.xml
│ ├── Maven__org_openjdk_jmh_jmh_core_1_19.xml
│ ├── Maven__org_openjdk_jmh_jmh_generator_annprocess_1_19.xml
│ ├── Maven__org_rauschig_jarchivelib_1_1_0.xml
│ ├── Maven__org_seleniumhq_selenium_selenium_api_3_141_59.xml
│ ├── Maven__org_seleniumhq_selenium_selenium_chrome_driver_3_141_59.xml
│ ├── Maven__org_seleniumhq_selenium_selenium_edge_driver_3_141_59.xml
│ ├── Maven__org_seleniumhq_selenium_selenium_firefox_driver_3_141_59.xml
│ ├── Maven__org_seleniumhq_selenium_selenium_ie_driver_3_141_59.xml
│ ├── Maven__org_seleniumhq_selenium_selenium_opera_driver_3_141_59.xml
│ ├── Maven__org_seleniumhq_selenium_selenium_remote_driver_3_141_59.xml
│ ├── Maven__org_seleniumhq_selenium_selenium_safari_driver_3_141_59.xml
│ ├── Maven__org_seleniumhq_selenium_selenium_support_3_141_59.xml
│ ├── Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml
│ ├── Maven__org_slf4j_slf4j_api_1_7_25.xml
│ ├── Maven__org_slf4j_slf4j_api_1_7_30.xml
│ ├── Maven__org_testng_testng_7_3_0.xml
│ └── Maven__org_yaml_snakeyaml_1_21.xml
├── misc.xml
├── modules.xml
├── uiDesigner.xml
├── vcs.xml
└── workspace.xml
├── Design-Patterns-for-High-Quality-Automated-Tests-Java-Edition.iml
├── README.md
├── chapter1-defining-high-quality-attributes
├── chapter1-defining-high-quality-attributes.iml
├── pom.xml
├── src
│ ├── main
│ │ ├── java
│ │ │ └── attributes
│ │ │ │ ├── BonusPointsDiscountCalculator.java
│ │ │ │ ├── CustomerOrder.java
│ │ │ │ ├── DiscountCalculator.java
│ │ │ │ ├── EmailFactory.java
│ │ │ │ ├── EmailLogger.java
│ │ │ │ ├── FileLogger.java
│ │ │ │ ├── GoldCustomerOrder.java
│ │ │ │ ├── GoldDiscountCalculator.java
│ │ │ │ ├── Logger.java
│ │ │ │ ├── OrderType.java
│ │ │ │ ├── PlatinumCustomerOrder.java
│ │ │ │ ├── PlatinumDiscountCalculator.java
│ │ │ │ ├── RegularDiscountCalculator.java
│ │ │ │ ├── SilverDiscountCalculator.java
│ │ │ │ ├── SmsFactory.java
│ │ │ │ └── SmsLogger.java
│ │ └── resources
│ │ │ └── chromedriver.exe
│ └── test
│ │ └── java
│ │ └── OrderTests.java
└── target
│ └── classes
│ └── chromedriver.exe
├── chapter10-test-data-preparation
├── Chapter 10- Test Data Preparation.iml
├── chapter10-test-data-preparation.iml
├── debug.log
├── pom.xml
├── src
│ ├── main
│ │ ├── java
│ │ │ ├── configuration
│ │ │ │ ├── BillingInfoDefaultValues.java
│ │ │ │ ├── BrowserSettings.java
│ │ │ │ ├── ConfigurationService.java
│ │ │ │ ├── UrlDeterminer.java
│ │ │ │ ├── UrlSettings.java
│ │ │ │ ├── User.java
│ │ │ │ └── WebSettings.java
│ │ │ ├── core
│ │ │ │ ├── Browser.java
│ │ │ │ ├── BrowserService.java
│ │ │ │ ├── CookiesService.java
│ │ │ │ ├── DialogButton.java
│ │ │ │ ├── DialogService.java
│ │ │ │ ├── Driver.java
│ │ │ │ ├── DriverDecorator.java
│ │ │ │ ├── Element.java
│ │ │ │ ├── ElementDecorator.java
│ │ │ │ ├── ElementFindService.java
│ │ │ │ ├── LogElement.java
│ │ │ │ ├── LoggingDriver.java
│ │ │ │ ├── NavigationService.java
│ │ │ │ ├── WebCoreDriver.java
│ │ │ │ └── WebCoreElement.java
│ │ │ ├── facadedesignpattern
│ │ │ │ ├── classic
│ │ │ │ │ ├── CartPage
│ │ │ │ │ │ ├── CartPage.java
│ │ │ │ │ │ ├── CartPageAssertions.java
│ │ │ │ │ │ └── CartPageElements.java
│ │ │ │ │ ├── CheckoutPage
│ │ │ │ │ │ ├── CheckoutAssertions.java
│ │ │ │ │ │ ├── CheckoutElements.java
│ │ │ │ │ │ └── CheckoutPage.java
│ │ │ │ │ ├── EShopPage.java
│ │ │ │ │ ├── MainPage
│ │ │ │ │ │ ├── MainPage.java
│ │ │ │ │ │ ├── MainPageAssertions.java
│ │ │ │ │ │ └── MainPageElements.java
│ │ │ │ │ ├── NavigatableEShopPage.java
│ │ │ │ │ ├── PurchaseFacade.java
│ │ │ │ │ ├── PurchaseInfo.java
│ │ │ │ │ └── Sections
│ │ │ │ │ │ ├── BreadcrumbSection.java
│ │ │ │ │ │ ├── CartInfoSection.java
│ │ │ │ │ │ ├── MainMenuSection.java
│ │ │ │ │ │ └── SearchSection.java
│ │ │ │ └── templatemethods
│ │ │ │ │ ├── CartPage
│ │ │ │ │ ├── CartPage.java
│ │ │ │ │ ├── CartPageAssertions.java
│ │ │ │ │ └── CartPageElements.java
│ │ │ │ │ ├── CheckoutPage
│ │ │ │ │ ├── CheckoutAssertions.java
│ │ │ │ │ ├── CheckoutElements.java
│ │ │ │ │ └── CheckoutPage.java
│ │ │ │ │ ├── EShopPage.java
│ │ │ │ │ ├── MainPage
│ │ │ │ │ ├── MainPage.java
│ │ │ │ │ ├── MainPageAssertions.java
│ │ │ │ │ └── MainPageElements.java
│ │ │ │ │ ├── NavigatableEShopPage.java
│ │ │ │ │ ├── NewPurchaseFacade.java
│ │ │ │ │ ├── PurchaseFacade.java
│ │ │ │ │ ├── PurchaseInfo.java
│ │ │ │ │ └── Sections
│ │ │ │ │ ├── BreadcrumbSection.java
│ │ │ │ │ ├── CartInfoSection.java
│ │ │ │ │ ├── MainMenuSection.java
│ │ │ │ │ └── SearchSection.java
│ │ │ └── multifilepageobjectpagesectionsappfluent
│ │ │ │ ├── App.java
│ │ │ │ ├── CartPage
│ │ │ │ ├── CartPage.java
│ │ │ │ └── CartPageElements.java
│ │ │ │ ├── EShopPage.java
│ │ │ │ ├── LoggingSingletonDriver.java
│ │ │ │ ├── MainPage
│ │ │ │ ├── MainPage.java
│ │ │ │ └── MainPageElements.java
│ │ │ │ ├── NavigatableEShopPage.java
│ │ │ │ ├── Sections
│ │ │ │ ├── BreadcrumbSection.java
│ │ │ │ ├── CartInfoSection.java
│ │ │ │ ├── MainMenuSection.java
│ │ │ │ └── SearchSection.java
│ │ │ │ └── SingletonFactory.java
│ │ └── resources
│ │ │ ├── application.properties
│ │ │ ├── testFrameworkSettings.dev.json
│ │ │ └── testFrameworkSettings.qa.json
│ └── test
│ │ └── java
│ │ ├── datastubs
│ │ └── UsingDataStubsTests.java
│ │ ├── facadedesignpattern
│ │ ├── classic
│ │ │ └── ProductPurchaseTestsWithPageObjects.java
│ │ └── templatemethods
│ │ │ └── ProductPurchaseTestsWithPageObjects.java
│ │ └── multifilepageobjectpagesectionsappfluent
│ │ └── ProductPurchaseTestsWithPageObjects.java
└── target
│ └── classes
│ ├── application.properties
│ ├── testFrameworkSettings.dev.json
│ └── testFrameworkSettings.qa.json
├── chapter2-optimize-refactor-flaky-tests
├── chapter2-optimize-refactor-flaky-tests.iml
├── pom.xml
├── src
│ ├── main
│ │ ├── java
│ │ │ └── decorators
│ │ │ │ ├── Browser.java
│ │ │ │ ├── Driver.java
│ │ │ │ ├── DriverDecorator.java
│ │ │ │ ├── Element.java
│ │ │ │ ├── ElementDecorator.java
│ │ │ │ ├── LogElement.java
│ │ │ │ ├── LoggingDriver.java
│ │ │ │ ├── WebCoreDriver.java
│ │ │ │ └── WebCoreElement.java
│ │ └── resources
│ │ │ └── chromedriver.exe
│ └── test
│ │ └── java
│ │ ├── decorators
│ │ └── ProductPurchaseTests.java
│ │ ├── hardcodedpauses
│ │ └── ProductPurchaseTests.java
│ │ └── webdriverwait
│ │ └── ProductPurchaseTests.java
└── target
│ └── classes
│ └── chromedriver.exe
├── chapter3-speeding-up-tests
├── Chapter 3- Optimize the Tests.iml
├── chapter3-speeding-up-tests.iml
├── debug.log
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ ├── instrumentedcode
│ │ ├── Browser.java
│ │ ├── Driver.java
│ │ ├── DriverDecorator.java
│ │ ├── Element.java
│ │ ├── ElementDecorator.java
│ │ ├── LogElement.java
│ │ ├── LoggingDriver.java
│ │ ├── WebCoreDriver.java
│ │ └── WebCoreElement.java
│ │ ├── reusebrowser
│ │ ├── Browser.java
│ │ ├── Driver.java
│ │ ├── DriverDecorator.java
│ │ ├── Element.java
│ │ ├── ElementDecorator.java
│ │ ├── LogElement.java
│ │ ├── LoggingDriver.java
│ │ ├── WebCoreDriver.java
│ │ ├── WebCoreElement.java
│ │ └── browserinfrastructure
│ │ │ ├── BaseTest.java
│ │ │ ├── BaseTestBehaviorObserver.java
│ │ │ ├── BrowserBehavior.java
│ │ │ ├── BrowserConfiguration.java
│ │ │ ├── BrowserLaunchTestBehaviorObserver.java
│ │ │ ├── ExecutionBrowser.java
│ │ │ ├── ExecutionSubject.java
│ │ │ ├── TestBehaviorObserver.java
│ │ │ └── TestExecutionSubject.java
│ │ ├── reusebrowsercleansession
│ │ ├── Browser.java
│ │ ├── Driver.java
│ │ ├── DriverDecorator.java
│ │ ├── Element.java
│ │ ├── ElementDecorator.java
│ │ ├── LogElement.java
│ │ ├── LoggingDriver.java
│ │ ├── WebCoreDriver.java
│ │ ├── WebCoreElement.java
│ │ └── browserinfrastructure
│ │ │ ├── BaseTest.java
│ │ │ ├── BaseTestBehaviorObserver.java
│ │ │ ├── BrowserBehavior.java
│ │ │ ├── BrowserConfiguration.java
│ │ │ ├── BrowserLaunchTestBehaviorObserver.java
│ │ │ ├── ExecutionBrowser.java
│ │ │ ├── ExecutionSubject.java
│ │ │ ├── TestBehaviorObserver.java
│ │ │ └── TestExecutionSubject.java
│ │ └── waitforajax
│ │ ├── Browser.java
│ │ ├── Driver.java
│ │ ├── DriverDecorator.java
│ │ ├── Element.java
│ │ ├── ElementDecorator.java
│ │ ├── LogElement.java
│ │ ├── LoggingDriver.java
│ │ ├── WebCoreDriver.java
│ │ └── WebCoreElement.java
│ └── test
│ └── java
│ ├── blackholeproxypattern
│ └── CaptureHttpTrafficTests.java
│ ├── instrumentedcode
│ └── ProductPurchaseTests.java
│ ├── reusebrowser
│ └── ProductPurchaseTests.java
│ ├── reusebrowsercleansession
│ └── ProductPurchaseTests.java
│ └── waitforajax
│ └── ProductPurchaseTests.java
├── chapter4-tests-readability
├── chapter4-tests-readability.iml
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ ├── core
│ │ ├── Browser.java
│ │ ├── Driver.java
│ │ ├── DriverDecorator.java
│ │ ├── Element.java
│ │ ├── ElementDecorator.java
│ │ ├── LogElement.java
│ │ ├── LoggingDriver.java
│ │ ├── WebCoreDriver.java
│ │ └── WebCoreElement.java
│ │ └── pages
│ │ ├── v0
│ │ └── singlefilepageobject
│ │ │ ├── CartPage.java
│ │ │ └── MainPage.java
│ │ ├── v1
│ │ └── singlefilepageobjectnondry
│ │ │ ├── CartPage.java
│ │ │ └── MainPage.java
│ │ ├── v2
│ │ └── singlefilepageobjectbasepage
│ │ │ ├── BaseEShopPage.java
│ │ │ ├── CartPage.java
│ │ │ └── MainPage.java
│ │ ├── v3
│ │ └── singlefilepageobjectssections
│ │ │ ├── CartPage.java
│ │ │ ├── MainPage.java
│ │ │ └── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ └── v4
│ │ └── singlefilepageobjectbasepagesections
│ │ ├── BaseEShopPage.java
│ │ ├── CartPage.java
│ │ ├── MainPage.java
│ │ └── sections
│ │ ├── BreadcrumbSection.java
│ │ ├── CartInfoSection.java
│ │ ├── MainMenuSection.java
│ │ └── SearchSection.java
│ └── test
│ └── java
│ └── pages
│ ├── v0
│ └── singlefilepageobject
│ │ ├── ProductPurchaseTestsWithPageObjects.java
│ │ └── ProductPurchaseWithoutPagesObjectsTests.java
│ └── v4
│ └── singlefilepageobjectbasepagesections
│ └── ProductPurchaseTestsWithPageObjects.java
├── chapter5-tests-maintainability
├── chapter5-tests-maintainability.iml
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ ├── core
│ │ ├── Browser.java
│ │ ├── Driver.java
│ │ ├── DriverDecorator.java
│ │ ├── Element.java
│ │ ├── ElementDecorator.java
│ │ ├── LogElement.java
│ │ ├── LoggingDriver.java
│ │ ├── WebCoreDriver.java
│ │ └── WebCoreElement.java
│ │ ├── facadedesignpattern
│ │ ├── classic
│ │ │ ├── CartPage
│ │ │ │ ├── CartPage.java
│ │ │ │ ├── CartPageAssertions.java
│ │ │ │ └── CartPageElements.java
│ │ │ ├── CheckoutPage
│ │ │ │ ├── CheckoutAssertions.java
│ │ │ │ ├── CheckoutElements.java
│ │ │ │ └── CheckoutPage.java
│ │ │ ├── EShopPage.java
│ │ │ ├── MainPage
│ │ │ │ ├── MainPage.java
│ │ │ │ ├── MainPageAssertions.java
│ │ │ │ └── MainPageElements.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ ├── PurchaseFacade.java
│ │ │ ├── PurchaseInfo.java
│ │ │ └── Sections
│ │ │ │ ├── BreadcrumbSection.java
│ │ │ │ ├── CartInfoSection.java
│ │ │ │ ├── MainMenuSection.java
│ │ │ │ └── SearchSection.java
│ │ └── templatemethods
│ │ │ ├── CartPage
│ │ │ ├── CartPage.java
│ │ │ ├── CartPageAssertions.java
│ │ │ └── CartPageElements.java
│ │ │ ├── CheckoutPage
│ │ │ ├── CheckoutAssertions.java
│ │ │ ├── CheckoutElements.java
│ │ │ └── CheckoutPage.java
│ │ │ ├── EShopPage.java
│ │ │ ├── MainPage
│ │ │ ├── MainPage.java
│ │ │ ├── MainPageAssertions.java
│ │ │ └── MainPageElements.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ ├── NewPurchaseFacade.java
│ │ │ ├── PurchaseFacade.java
│ │ │ ├── PurchaseInfo.java
│ │ │ └── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ └── pages
│ │ ├── v0
│ │ └── singlefilepageobject
│ │ │ ├── CartPage.java
│ │ │ └── MainPage.java
│ │ ├── v1
│ │ └── singlefilepageobjectnondry
│ │ │ ├── CartPage.java
│ │ │ └── MainPage.java
│ │ ├── v11
│ │ └── multifilepageobjectnavibasepagegeneric
│ │ │ ├── .idea
│ │ │ ├── checkstyle-idea.xml
│ │ │ ├── misc.xml
│ │ │ ├── modules.xml
│ │ │ ├── vcs.xml
│ │ │ └── workspace.xml
│ │ │ ├── AssertableEShopPage.java
│ │ │ ├── BaseAssertions.java
│ │ │ ├── BaseElements.java
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── CartPage
│ │ │ ├── CartPage.java
│ │ │ ├── CartPageAssertions.java
│ │ │ └── CartPageElements.java
│ │ │ ├── EShopPage.java
│ │ │ ├── MainMenuSection.java
│ │ │ ├── MainPage
│ │ │ ├── MainPage.java
│ │ │ ├── MainPageAssertions.java
│ │ │ └── MainPageElements.java
│ │ │ ├── NavigatableAssertableEShopPage.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ ├── NewInstanceFactory.java
│ │ │ ├── SearchSection.java
│ │ │ └── multifilepageobjectnavibasepagegeneric.iml
│ │ ├── v2
│ │ └── singlefilepageobjectbasepage
│ │ │ ├── BaseEShopPage.java
│ │ │ ├── CartPage.java
│ │ │ └── MainPage.java
│ │ ├── v3
│ │ └── singlefilepageobjectssections
│ │ │ ├── CartPage.java
│ │ │ ├── MainPage.java
│ │ │ └── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ ├── v4
│ │ └── singlefilepageobjectbasepagesections
│ │ │ ├── BaseEShopPage.java
│ │ │ ├── CartPage.java
│ │ │ ├── MainPage.java
│ │ │ └── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ ├── v5
│ │ └── singlefilepageobjectnavibasepagesections
│ │ │ ├── CartPage.java
│ │ │ ├── EShopPage.java
│ │ │ ├── MainPage.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ └── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ └── v6
│ │ └── multifilepageobjectnavibasepagesections
│ │ ├── CartPage
│ │ ├── CartPage.java
│ │ └── CartPageElements.java
│ │ ├── EShopPage.java
│ │ ├── MainPage
│ │ ├── MainPage.java
│ │ ├── MainPageAssertions.java
│ │ └── MainPageElements.java
│ │ ├── NavigatableEShopPage.java
│ │ └── Sections
│ │ ├── BreadcrumbSection.java
│ │ ├── CartInfoSection.java
│ │ ├── MainMenuSection.java
│ │ └── SearchSection.java
│ └── test
│ └── java
│ ├── facadedesignpattern
│ ├── classic
│ │ └── ProductPurchaseTestsWithPageObjects.java
│ └── templatemethods
│ │ └── ProductPurchaseTestsWithPageObjects.java
│ └── pages
│ ├── v0
│ └── singlefilepageobject
│ │ ├── ProductPurchaseTestsWithPageObjects.java
│ │ └── ProductPurchaseWithoutPagesObjectsTests.java
│ ├── v4
│ └── singlefilepageobjectbasepagesections
│ │ └── ProductPurchaseTestsWithPageObjects.java
│ ├── v5
│ └── singlefilepageobjectnavibasepagesections
│ │ └── ProductPurchaseTestsWithPageObjects.java
│ └── v6
│ └── multifilepageobjectnavibasepagesections
│ └── ProductPurchaseTestsWithPageObjects.java
├── chapter6-api-usability
├── Chapter 6- API Usability.iml
├── chapter6-api-usability.iml
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ ├── core
│ │ ├── Browser.java
│ │ ├── BrowserService.java
│ │ ├── CookiesService.java
│ │ ├── DialogButton.java
│ │ ├── DialogService.java
│ │ ├── Driver.java
│ │ ├── DriverDecorator.java
│ │ ├── Element.java
│ │ ├── ElementDecorator.java
│ │ ├── ElementFindService.java
│ │ ├── LogElement.java
│ │ ├── LoggingDriver.java
│ │ ├── NavigationService.java
│ │ ├── WebCoreDriver.java
│ │ └── WebCoreElement.java
│ │ └── pages
│ │ ├── v10
│ │ └── multifilepageobjectpagesectionsappfluent
│ │ │ ├── App.java
│ │ │ ├── CartPage
│ │ │ ├── CartPage.java
│ │ │ └── CartPageElements.java
│ │ │ ├── EShopPage.java
│ │ │ ├── LoggingSingletonDriver.java
│ │ │ ├── MainPage
│ │ │ ├── MainPage.java
│ │ │ └── MainPageElements.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ ├── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ │ └── SingletonFactory.java
│ │ ├── v6
│ │ └── multifilepageobjectnavibasepagesections
│ │ │ ├── CartPage
│ │ │ ├── CartPage.java
│ │ │ └── CartPageElements.java
│ │ │ ├── EShopPage.java
│ │ │ ├── MainPage
│ │ │ ├── MainPage.java
│ │ │ ├── MainPageAssertions.java
│ │ │ └── MainPageElements.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ └── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ ├── v7
│ │ └── multifilepageobjectsectionsdriverinterfaces
│ │ │ ├── CartPage
│ │ │ ├── CartPage.java
│ │ │ └── CartPageElements.java
│ │ │ ├── EShopPage.java
│ │ │ ├── MainPage
│ │ │ ├── MainPage.java
│ │ │ ├── MainPageAssertions.java
│ │ │ └── MainPageElements.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ └── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ ├── v8
│ │ └── multifilepageobjectsectionssingleton
│ │ │ ├── CartPage
│ │ │ ├── CartPage.java
│ │ │ └── CartPageElements.java
│ │ │ ├── EShopPage.java
│ │ │ ├── LoggingSingletonDriver.java
│ │ │ ├── MainPage
│ │ │ ├── MainPage.java
│ │ │ ├── MainPageAssertions.java
│ │ │ └── MainPageElements.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ ├── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ │ └── SingletonFactory.java
│ │ └── v9
│ │ └── multifilepageobjectpagesectionsapp
│ │ ├── App.java
│ │ ├── CartPage
│ │ ├── CartPage.java
│ │ └── CartPageElements.java
│ │ ├── EShopPage.java
│ │ ├── LoggingSingletonDriver.java
│ │ ├── MainPage
│ │ ├── MainPage.java
│ │ ├── MainPageAssertions.java
│ │ └── MainPageElements.java
│ │ ├── NavigatableEShopPage.java
│ │ ├── Sections
│ │ ├── BreadcrumbSection.java
│ │ ├── CartInfoSection.java
│ │ ├── MainMenuSection.java
│ │ └── SearchSection.java
│ │ └── SingletonFactory.java
│ └── test
│ └── java
│ └── pages
│ ├── v10
│ └── multifilepageobjectpagesectionsappfluent
│ │ └── ProductPurchaseTestsWithPageObjects.java
│ ├── v6
│ └── multifilepageobjectnavibasepagesections
│ │ └── ProductPurchaseTestsWithPageObjects.java
│ ├── v7
│ └── multifilepageobjectsectionsdriverinterfaces
│ │ └── ProductPurchaseTestsWithPageObjects.java
│ ├── v8
│ └── multifilepageobjectsectionssingleton
│ │ └── ProductPurchaseTestsWithPageObjects.java
│ └── v9
│ └── multifilepageobjectpagesectionsapp
│ └── ProductPurchaseTestsWithPageObjects.java
├── chapter7-extensibility
├── chapter7-extensibility.iml
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ ├── core
│ │ ├── App.java
│ │ ├── Browser.java
│ │ ├── DialogButton.java
│ │ ├── Driver.java
│ │ ├── DriverDecorator.java
│ │ ├── Element.java
│ │ ├── ElementDecorator.java
│ │ ├── LogElement.java
│ │ ├── LoggingDriver.java
│ │ ├── LoggingListener.java
│ │ ├── LoggingSingletonDriver.java
│ │ ├── SingletonFactory.java
│ │ ├── WebCoreDriver.java
│ │ ├── WebCoreElement.java
│ │ ├── interfaces
│ │ │ ├── BrowserService.java
│ │ │ ├── CookiesService.java
│ │ │ ├── DialogService.java
│ │ │ ├── ElementFindService.java
│ │ │ ├── ElementWaitService.java
│ │ │ └── NavigationService.java
│ │ ├── locators
│ │ │ ├── ClassFindStrategy.java
│ │ │ ├── CssFindStrategy.java
│ │ │ ├── FindStrategy.java
│ │ │ ├── IdContainingFindStrategy.java
│ │ │ ├── IdFindStrategy.java
│ │ │ ├── InnerTextContainsFindStrategy.java
│ │ │ ├── LinkTextFindStrategy.java
│ │ │ ├── TagFindStrategy.java
│ │ │ └── XPathFindStrategy.java
│ │ └── wait
│ │ │ ├── ToBeClickableWaitStrategy.java
│ │ │ ├── ToBeVisibleWaitStrategy.java
│ │ │ ├── ToExistsWaitStrategy.java
│ │ │ ├── Wait.java
│ │ │ ├── WaitStrategy.java
│ │ │ └── WaitStrategyFactory.java
│ │ └── pages
│ │ └── v10
│ │ └── multifilepageobjectpagesectionsappfluent
│ │ ├── CartPage
│ │ ├── CartPage.java
│ │ └── CartPageElements.java
│ │ ├── EShopPage.java
│ │ ├── MainPage
│ │ ├── MainPage.java
│ │ └── MainPageElements.java
│ │ ├── NavigatableEShopPage.java
│ │ └── Sections
│ │ ├── BreadcrumbSection.java
│ │ ├── CartInfoSection.java
│ │ ├── MainMenuSection.java
│ │ └── SearchSection.java
│ └── test
│ └── java
│ └── pages
│ └── v10
│ └── multifilepageobjectpagesectionsappfluent
│ └── ProductPurchaseTestsWithPageObjects.java
├── chapter8-assessment-system
├── chapter8-assessment-system.iml
├── pom.xml
└── src
│ ├── main
│ └── java
│ │ ├── core
│ │ ├── Browser.java
│ │ ├── BrowserService.java
│ │ ├── CookiesService.java
│ │ ├── DialogButton.java
│ │ ├── DialogService.java
│ │ ├── Driver.java
│ │ ├── DriverDecorator.java
│ │ ├── Element.java
│ │ ├── ElementDecorator.java
│ │ ├── ElementFindService.java
│ │ ├── LogElement.java
│ │ ├── LoggingDriver.java
│ │ ├── NavigationService.java
│ │ ├── WebCoreDriver.java
│ │ └── WebCoreElement.java
│ │ ├── facadedesignpattern
│ │ ├── classic
│ │ │ ├── CartPage
│ │ │ │ ├── CartPage.java
│ │ │ │ ├── CartPageAssertions.java
│ │ │ │ └── CartPageElements.java
│ │ │ ├── CheckoutPage
│ │ │ │ ├── CheckoutAssertions.java
│ │ │ │ ├── CheckoutElements.java
│ │ │ │ └── CheckoutPage.java
│ │ │ ├── EShopPage.java
│ │ │ ├── MainPage
│ │ │ │ ├── MainPage.java
│ │ │ │ ├── MainPageAssertions.java
│ │ │ │ └── MainPageElements.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ ├── PurchaseFacade.java
│ │ │ ├── PurchaseInfo.java
│ │ │ └── Sections
│ │ │ │ ├── BreadcrumbSection.java
│ │ │ │ ├── CartInfoSection.java
│ │ │ │ ├── MainMenuSection.java
│ │ │ │ └── SearchSection.java
│ │ └── templatemethods
│ │ │ ├── CartPage
│ │ │ ├── CartPage.java
│ │ │ ├── CartPageAssertions.java
│ │ │ └── CartPageElements.java
│ │ │ ├── CheckoutPage
│ │ │ ├── CheckoutAssertions.java
│ │ │ ├── CheckoutElements.java
│ │ │ └── CheckoutPage.java
│ │ │ ├── EShopPage.java
│ │ │ ├── MainPage
│ │ │ ├── MainPage.java
│ │ │ ├── MainPageAssertions.java
│ │ │ └── MainPageElements.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ ├── NewPurchaseFacade.java
│ │ │ ├── PurchaseFacade.java
│ │ │ ├── PurchaseInfo.java
│ │ │ └── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ └── multifilepageobjectpagesectionsappfluent
│ │ ├── App.java
│ │ ├── CartPage
│ │ ├── CartPage.java
│ │ └── CartPageElements.java
│ │ ├── EShopPage.java
│ │ ├── LoggingSingletonDriver.java
│ │ ├── MainPage
│ │ ├── MainPage.java
│ │ └── MainPageElements.java
│ │ ├── NavigatableEShopPage.java
│ │ ├── Sections
│ │ ├── BreadcrumbSection.java
│ │ ├── CartInfoSection.java
│ │ ├── MainMenuSection.java
│ │ └── SearchSection.java
│ │ └── SingletonFactory.java
│ └── test
│ └── java
│ ├── facadedesignpattern
│ ├── classic
│ │ └── ProductPurchaseTestsWithPageObjects.java
│ └── templatemethods
│ │ └── ProductPurchaseTestsWithPageObjects.java
│ └── pages
│ └── v10
│ └── multifilepageobjectpagesectionsappfluent
│ └── ProductPurchaseTestsWithPageObjects.java
├── chapter9-benchmarking
├── chapter9-benchmarking.iml
├── pom.xml
├── src
│ └── main
│ │ ├── java
│ │ ├── META-INF
│ │ │ └── MANIFEST.MF
│ │ ├── core
│ │ │ ├── BenchmarkRunner.java
│ │ │ ├── Browser.java
│ │ │ ├── Driver.java
│ │ │ ├── DriverDecorator.java
│ │ │ ├── Element.java
│ │ │ ├── ElementDecorator.java
│ │ │ ├── LogElement.java
│ │ │ ├── LoggingDriver.java
│ │ │ ├── WebCoreDriver.java
│ │ │ ├── WebCoreElement.java
│ │ │ └── browserinfrastructure
│ │ │ │ ├── BaseBenchmark.java
│ │ │ │ ├── BaseTestBehaviorObserver.java
│ │ │ │ ├── BrowserBehavior.java
│ │ │ │ ├── BrowserConfiguration.java
│ │ │ │ ├── BrowserLaunchTestBehaviorObserver.java
│ │ │ │ ├── ExecutionBrowser.java
│ │ │ │ ├── ExecutionSubject.java
│ │ │ │ ├── TestBehaviorObserver.java
│ │ │ │ └── TestExecutionSubject.java
│ │ └── facades
│ │ │ ├── CartPage
│ │ │ ├── CartPage.java
│ │ │ ├── CartPageAssertions.java
│ │ │ └── CartPageElements.java
│ │ │ ├── CheckoutPage
│ │ │ ├── CheckoutAssertions.java
│ │ │ ├── CheckoutElements.java
│ │ │ └── CheckoutPage.java
│ │ │ ├── EShopPage.java
│ │ │ ├── MainPage
│ │ │ ├── MainPage.java
│ │ │ ├── MainPageAssertions.java
│ │ │ └── MainPageElements.java
│ │ │ ├── NavigatableEShopPage.java
│ │ │ ├── NewPurchaseFacade.java
│ │ │ ├── PurchaseFacade.java
│ │ │ ├── PurchaseInfo.java
│ │ │ └── Sections
│ │ │ ├── BreadcrumbSection.java
│ │ │ ├── CartInfoSection.java
│ │ │ ├── MainMenuSection.java
│ │ │ └── SearchSection.java
│ │ └── resources
│ │ └── META-INF
│ │ └── MANIFEST.MF
└── target
│ └── classes
│ └── META-INF
│ ├── BenchmarkList
│ ├── CompilerHints
│ └── MANIFEST.MF
├── design-patterns-for-high-quality-automated-tests.iml
├── out
└── artifacts
│ └── chapter9_benchmarking_jar
│ ├── Chapter 9- Benchmarking.jar
│ ├── animal-sniffer-annotations-1.14.jar
│ ├── ant-1.10.3.jar
│ ├── ant-launcher-1.10.3.jar
│ ├── aopalliance-1.0.jar
│ ├── byte-buddy-1.8.15.jar
│ ├── checker-compat-qual-2.0.0.jar
│ ├── commons-codec-1.13.jar
│ ├── commons-compress-1.20.jar
│ ├── commons-exec-1.3.jar
│ ├── commons-io-2.8.0.jar
│ ├── commons-lang3-3.11.jar
│ ├── commons-math3-3.2.jar
│ ├── error_prone_annotations-2.1.3.jar
│ ├── gson-2.8.6.jar
│ ├── guava-25.0-jre.jar
│ ├── guice-4.2.2-no_aop.jar
│ ├── hamcrest-core-1.3.jar
│ ├── httpclient5-5.0.1.jar
│ ├── httpcore5-5.0.1.jar
│ ├── httpcore5-h2-5.0.1.jar
│ ├── j2objc-annotations-1.1.jar
│ ├── jarchivelib-1.1.0.jar
│ ├── javax.inject-1.jar
│ ├── jcommander-1.78.jar
│ ├── jmh-core-1.19.jar
│ ├── jmh-generator-annprocess-1.19.jar
│ ├── jopt-simple-4.6.jar
│ ├── jsoup-1.13.1.jar
│ ├── jsr305-1.3.9.jar
│ ├── junit-4.12.jar
│ ├── okhttp-3.11.0.jar
│ ├── okio-1.14.0.jar
│ ├── selenium-api-3.141.59.jar
│ ├── selenium-chrome-driver-3.141.59.jar
│ ├── selenium-firefox-driver-3.141.59.jar
│ ├── selenium-remote-driver-3.141.59.jar
│ ├── selenium-support-3.141.59.jar
│ ├── slf4j-api-1.7.30.jar
│ ├── snakeyaml-1.21.jar
│ ├── testng-7.3.0.jar
│ └── webdrivermanager-4.2.2.jar
└── pom.xml
/.gitignore:
--------------------------------------------------------------------------------
1 |
2 | *.class
3 | *.class
4 |
--------------------------------------------------------------------------------
/.gradle/6.7/fileChanges/last-build.bin:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/.gradle/6.7/fileHashes/fileHashes.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AutomateThePlanet/Design-Patterns-for-High-Quality-Automated-Tests-Java-Edition/eb5c5db3bfefabde22eb4bb048d089be211520eb/.gradle/6.7/fileHashes/fileHashes.lock
--------------------------------------------------------------------------------
/.gradle/6.7/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AutomateThePlanet/Design-Patterns-for-High-Quality-Automated-Tests-Java-Edition/eb5c5db3bfefabde22eb4bb048d089be211520eb/.gradle/6.7/gc.properties
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/buildOutputCleanup.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AutomateThePlanet/Design-Patterns-for-High-Quality-Automated-Tests-Java-Edition/eb5c5db3bfefabde22eb4bb048d089be211520eb/.gradle/buildOutputCleanup/buildOutputCleanup.lock
--------------------------------------------------------------------------------
/.gradle/buildOutputCleanup/cache.properties:
--------------------------------------------------------------------------------
1 | #Mon Jan 11 16:44:23 EET 2021
2 | gradle.version=6.7
3 |
--------------------------------------------------------------------------------
/.gradle/checksums/checksums.lock:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AutomateThePlanet/Design-Patterns-for-High-Quality-Automated-Tests-Java-Edition/eb5c5db3bfefabde22eb4bb048d089be211520eb/.gradle/checksums/checksums.lock
--------------------------------------------------------------------------------
/.gradle/configuration-cache/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AutomateThePlanet/Design-Patterns-for-High-Quality-Automated-Tests-Java-Edition/eb5c5db3bfefabde22eb4bb048d089be211520eb/.gradle/configuration-cache/gc.properties
--------------------------------------------------------------------------------
/.gradle/vcs-1/gc.properties:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AutomateThePlanet/Design-Patterns-for-High-Quality-Automated-Tests-Java-Edition/eb5c5db3bfefabde22eb4bb048d089be211520eb/.gradle/vcs-1/gc.properties
--------------------------------------------------------------------------------
/.idea/.name:
--------------------------------------------------------------------------------
1 | design-patterns-for-high-quality-automated-tests
--------------------------------------------------------------------------------
/.idea/checkstyle-idea.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
15 |
16 |
--------------------------------------------------------------------------------
/.idea/jarRepositories.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__aopalliance_aopalliance_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_beust_jcommander_1_78.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_annotations_2_8_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_core_2_8_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_fasterxml_jackson_core_jackson_databind_2_8_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_code_findbugs_jsr305_1_3_9.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_code_gson_gson_2_8_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_errorprone_error_prone_annotations_2_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_guava_guava_25_0_jre.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_inject_guice_no_aop_4_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_google_j2objc_j2objc_annotations_1_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_jcraft_jzlib_1_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_squareup_okhttp3_okhttp_3_11_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__com_squareup_okio_okio_1_14_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_codec_commons_codec_1_13.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__commons_io_commons_io_2_8_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__dnsjava_dnsjava_2_1_8.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_github_bonigarcia_webdrivermanager_4_2_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__io_netty_netty_all_4_0_51_Final.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__javax_inject_javax_inject_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__junit_junit_4_12.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__net_bytebuddy_byte_buddy_1_8_15.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__net_lightbody_bmp_browsermob_core_2_1_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__net_lightbody_bmp_littleproxy_1_1_0_beta_bmp_17.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__net_lightbody_bmp_mitm_2_1_5.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__net_sf_jopt_simple_jopt_simple_4_6.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_ant_ant_1_10_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_ant_ant_launcher_1_10_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_commons_commons_compress_1_20.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_commons_commons_exec_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_commons_commons_lang3_3_11.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_commons_commons_math3_3_2.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_httpcomponents_client5_httpclient5_5_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_httpcomponents_core5_httpcore5_5_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_apache_httpcomponents_core5_httpcore5_h2_5_0_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_bouncycastle_bcpkix_jdk15on_1_58.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_bouncycastle_bcprov_jdk15on_1_58.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_checkerframework_checker_compat_qual_2_0_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_codehaus_mojo_animal_sniffer_annotations_1_14.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_hamcrest_hamcrest_core_1_3.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_jsoup_jsoup_1_13_1.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_openjdk_jmh_jmh_core_1_19.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_openjdk_jmh_jmh_generator_annprocess_1_19.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_rauschig_jarchivelib_1_1_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_api_3_141_59.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_chrome_driver_3_141_59.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_edge_driver_3_141_59.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_firefox_driver_3_141_59.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_ie_driver_3_141_59.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_opera_driver_3_141_59.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_remote_driver_3_141_59.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_safari_driver_3_141_59.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_seleniumhq_selenium_selenium_support_3_141_59.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_jcl_over_slf4j_1_7_25.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_25.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_slf4j_slf4j_api_1_7_30.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_testng_testng_7_3_0.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/libraries/Maven__org_yaml_snakeyaml_1_21.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
--------------------------------------------------------------------------------
/.idea/misc.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/.idea/vcs.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
--------------------------------------------------------------------------------
/Design-Patterns-for-High-Quality-Automated-Tests-Java-Edition.iml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/BonusPointsDiscountCalculator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public interface BonusPointsDiscountCalculator {
17 | double calculateBonusPointsDiscount(double totalPrice, int points);
18 | }
19 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/DiscountCalculator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public interface DiscountCalculator {
17 | double calculateRegularDiscount(double totalPrice);
18 |
19 | double calculateBonusPointsDiscount(double totalPrice, int points) throws NoSuchMethodException;
20 | }
21 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/EmailFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public class EmailFactory {
17 | public static void sendEmail(String errorMessage) {
18 | // send email logic
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/EmailLogger.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public class EmailLogger implements Logger {
17 | public void createLogEntry(String errorMessage) {
18 | EmailFactory.sendEmail(errorMessage);
19 | }
20 | }
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/FileLogger.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | import java.io.BufferedWriter;
17 | import java.io.IOException;
18 | import java.nio.file.Files;
19 | import java.nio.file.Path;
20 | import java.nio.file.Paths;
21 |
22 | public class FileLogger implements Logger {
23 | public void createLogEntry(String error) throws IOException {
24 | Path path = Paths.get("C:\\errors.txt");
25 | BufferedWriter writer = Files.newBufferedWriter(path);
26 | writer.write(error);
27 | }
28 | }
29 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/GoldCustomerOrder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public class GoldCustomerOrder extends CustomerOrder {
17 | public GoldCustomerOrder() {
18 | super(new EmailLogger());
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/GoldDiscountCalculator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public class GoldDiscountCalculator implements DiscountCalculator {
17 | public double calculateRegularDiscount(double totalPrice) {
18 | return totalPrice - 50;
19 | }
20 |
21 | public double calculateBonusPointsDiscount(double totalPrice, int points) {
22 | return totalPrice - points * 1;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/Logger.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | import java.io.IOException;
17 |
18 | public interface Logger {
19 | void createLogEntry(String errorMessage) throws IOException;
20 | }
21 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/OrderType.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public enum OrderType {
17 | NORMAL,
18 | SILVER,
19 | GOLD,
20 | PLATINUM
21 | }
22 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/PlatinumCustomerOrder.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public class PlatinumCustomerOrder extends CustomerOrder {
17 | public PlatinumCustomerOrder() {
18 | super(new SmsLogger());
19 | }
20 | }
21 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/PlatinumDiscountCalculator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public class PlatinumDiscountCalculator implements DiscountCalculator {
17 | public double calculateRegularDiscount(double totalPrice) {
18 | return totalPrice - 100;
19 | }
20 |
21 | public double calculateBonusPointsDiscount(double totalPrice, int points) throws NoSuchMethodException {
22 | throw new NoSuchMethodException("Not applicable for Platinum orders.");
23 | }
24 | }
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/RegularDiscountCalculator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public interface RegularDiscountCalculator {
17 | double calculateRegularDiscount(double totalPrice);
18 | }
19 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/SilverDiscountCalculator.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public class SilverDiscountCalculator implements DiscountCalculator {
17 | public double calculateRegularDiscount(double totalPrice) {
18 | return totalPrice - 20;
19 | }
20 |
21 | public double calculateBonusPointsDiscount(double totalPrice, int points) {
22 | return totalPrice - points * 0.5;
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/SmsFactory.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public class SmsFactory {
17 | public static void sendSms(String errorMessage) {
18 | // send SMS logic
19 | }
20 | }
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/java/attributes/SmsLogger.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package attributes;
15 |
16 | public class SmsLogger implements Logger {
17 | public void createLogEntry(String errorMessage) {
18 | SmsFactory.sendSms(errorMessage);
19 | }
20 | }
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/src/main/resources/chromedriver.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AutomateThePlanet/Design-Patterns-for-High-Quality-Automated-Tests-Java-Edition/eb5c5db3bfefabde22eb4bb048d089be211520eb/chapter1-defining-high-quality-attributes/src/main/resources/chromedriver.exe
--------------------------------------------------------------------------------
/chapter1-defining-high-quality-attributes/target/classes/chromedriver.exe:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/AutomateThePlanet/Design-Patterns-for-High-Quality-Automated-Tests-Java-Edition/eb5c5db3bfefabde22eb4bb048d089be211520eb/chapter1-defining-high-quality-attributes/target/classes/chromedriver.exe
--------------------------------------------------------------------------------
/chapter10-test-data-preparation/Chapter 10- Test Data Preparation.iml:
--------------------------------------------------------------------------------
1 |
2 |
--------------------------------------------------------------------------------
/chapter10-test-data-preparation/debug.log:
--------------------------------------------------------------------------------
1 | [1111/163413.719:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
2 | [1111/164017.089:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
3 | [1111/180038.522:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
4 | [1111/185602.428:ERROR:directory_reader_win.cc(43)] FindFirstFile: The system cannot find the path specified. (0x3)
5 |
--------------------------------------------------------------------------------
/chapter10-test-data-preparation/src/main/java/configuration/BrowserSettings.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package configuration;
15 |
16 | public class BrowserSettings {
17 | private int pageLoadTimeout;
18 | private int scriptTimeout;
19 |
20 | public int getPageLoadTimeout() {
21 | return pageLoadTimeout;
22 | }
23 |
24 | public int getScriptTimeout() {
25 | return scriptTimeout;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | return "BrowserSettings{" +
31 | "pageLoadTimeout=" + pageLoadTimeout +
32 | ", scriptTimeout=" + scriptTimeout +
33 | '}';
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/chapter10-test-data-preparation/src/main/java/configuration/UrlSettings.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package configuration;
15 |
16 | public class UrlSettings {
17 | private String shopUrl;
18 | private String accountUrl;
19 |
20 | public String getShopUrl() {
21 | return shopUrl;
22 | }
23 |
24 | public String getAccountUrl() {
25 | return accountUrl;
26 | }
27 |
28 | @Override
29 | public String toString() {
30 | return "UrlSettings{" +
31 | "shopUrl='" + shopUrl + '\'' +
32 | ", accountUrl='" + accountUrl + '\'' +
33 | '}';
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/chapter10-test-data-preparation/src/main/java/core/Browser.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package core;
15 |
16 | public enum Browser {
17 | CHROME,
18 | FIREFOX,
19 | EDGE,
20 | OPERA,
21 | SAFARI,
22 | INTERNET_EXPLORER,
23 | }
24 |
--------------------------------------------------------------------------------
/chapter10-test-data-preparation/src/main/java/core/BrowserService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package core;
15 |
16 | import java.io.IOException;
17 |
18 | public interface BrowserService {
19 | void start(Browser browser) throws IOException;
20 | void quit();
21 | void waitForAjax();
22 | void waitUntilPageLoadsCompletely();
23 | }
24 |
--------------------------------------------------------------------------------
/chapter10-test-data-preparation/src/main/java/core/CookiesService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package core;
15 |
16 | public interface CookiesService {
17 | // void addCookie(String cookieName, String cookieValue, String path);
18 | //
19 | // void deleteAllCookies();
20 | //
21 | // void deleteCookie(String cookieName);
22 | //
23 | // List getAllCookies();
24 | //
25 | // String getCookie(String cookieName);
26 | }
27 |
--------------------------------------------------------------------------------
/chapter10-test-data-preparation/src/main/java/core/DialogButton.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package core;
15 |
16 | public enum DialogButton {
17 | OK,
18 | CANCEL,
19 | OPEN,
20 | YES,
21 | NO,
22 | CLOSE,
23 | RUN,
24 | SAVE,
25 | }
26 |
--------------------------------------------------------------------------------
/chapter10-test-data-preparation/src/main/java/core/DialogService.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2021 Automate The Planet Ltd.
3 | * Author: Anton Angelov
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * You may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
7 | * Unless required by applicable law or agreed to in writing, software
8 | * distributed under the License is distributed on an "AS IS" BASIS,
9 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
10 | * See the License for the specific language governing permissions and
11 | * limitations under the License.
12 | */
13 |
14 | package core;
15 |
16 | public interface DialogService {
17 | // void handle(Function