Package dev.comfast.cf.common.utils
Class BrowserContent
java.lang.Object
dev.comfast.cf.common.utils.BrowserContent
Utility class to write browser html / css / js
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAdd $ and $$ JS methods to current page for conveniencevoidclearAll()Clear all html contentvoidopenResourceFile(String resourcePath) Copy given resource file to temp folder and open it in browser.Set body tag contentsetScriptTag(String scriptContent) Adds script tag to head sectionSet style tag to head section
-
Constructor Details
-
BrowserContent
public BrowserContent()
-
-
Method Details
-
openResourceFile
Copy given resource file to temp folder and open it in browser.- Parameters:
resourcePath- path to resource file, where root is "src/test/resources"
-
setStyle
Set style tag to head section -
setBody
Set body tag content -
addJsTools
Add $ and $$ JS methods to current page for convenience -
setScriptTag
Adds script tag to head section -
clearAll
public void clearAll()Clear all html content
-