Package io.github.giulong.spectrum
Class SpectrumPage<T extends SpectrumPage<T,Data>,Data>
java.lang.Object
io.github.giulong.spectrum.SpectrumEntity<T,Data>
io.github.giulong.spectrum.SpectrumPage<T,Data>
public abstract class SpectrumPage<T extends SpectrumPage<T,Data>,Data>
extends SpectrumEntity<T,Data>
-
Field Summary
Fields inherited from class io.github.giulong.spectrum.SpectrumEntity
actions, configuration, data, downloadWait, driver, eventsDispatcher, extentReports, extentTest, HASH_ALGORITHM, implicitWait, js, pageLoadWait, scriptWait, testData
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isLoaded()
Checks whether the SpectrumPage instance on which this is called is fully loadedopen()
Opens the web page at the URL made by the concatenation of thebaseUrl
provided in theconfiguration.yaml
and the value of the@Endpoint
annotation on the calling SpectrumPage.This is a method that by default just logs a warning.Methods inherited from class io.github.giulong.spectrum.SpectrumEntity
addScreenshotToReport, checkDownloadedFile, checkDownloadedFile, clearAndSendKeys, deleteDownloadsFolder, getSharedFields, hasClass, hasClasses, hover, isNotPresent, isPresent, screenshot, screenshotFail, screenshotInfo, screenshotWarning, sha256Of, upload, waitForDownloadOf
-
Constructor Details
-
SpectrumPage
public SpectrumPage()
-
-
Method Details
-
open
Opens the web page at the URL made by the concatenation of thebaseUrl
provided in theconfiguration.yaml
and the value of the@Endpoint
annotation on the calling SpectrumPage. It also calls thewaitForPageLoading()
waitForPageLoading} before returning- Returns:
- the calling SpectrumPage instance
-
waitForPageLoading
This is a method that by default just logs a warning. If you need to check for custom conditions before considering a page fully loaded, you should override this method, so that callingopen
on pages will call your implementation automatically- Returns:
- the calling SpectrumPage instance
-
isLoaded
public boolean isLoaded()Checks whether the SpectrumPage instance on which this is called is fully loaded- Returns:
- true if the SpectrumPage is loaded
-