.html()
FuncUnit.prototype.html
html([html] [,timeout] [,success] [,message])
Gets the html from an element or waits until the html is a certain value.
//checks foo's html has "JupiterJS"
ok( /JupiterJS/.test(F('#foo').html() ) )
//waits until foo's html has JupiterJS
F('#foo').html(/JupiterJS/)
//waits until foo's html is JupiterJS
F('#foo').html("JupiterJS")
Parameters
-
html
{String | function()}
OptionalIf provided uses this as a check before continuing to the next action.
-
timeout
{Number}
Optionaloverrides FuncUnit.timeout. If provided, the wait will fail if not completed before this timeout.
-
success
{function()}
Optionala callback that will run after this action completes.
-
message
{String}
Optionalif provided, an assertion will be passed when this wait condition completes successfully
Returns
{String | funcUnit}
if the html parameter is provided, returns the funcUnit selector for chaining, otherwise returns the html of the selector.