Skip to main content Link Menu Expand (external link) Document Search Copy Copied

standard.test.printed

description

Tests whether the element was printed onto the page (and has not been removed since then).

syntax

getX(ELEMENT_NAME).test.printed()

What does getX() mean?


example(s)


@
@newText("instructions", "Click on Top/Bottom to NOT print its word")
@    .print()
@,
@newButton("top", "Top")
@    .callback( getButton("top").remove() ) 
@    .print()
@,
@newButton("bottom", "Bottom")
@    .callback( getButton("bottom").remove() )
@    .print()
@,
@newButton("print", "Print the buttons' words")
@    .print()
@    .wait()
@    .remove()
@,
$getButton("top")
$    .test.printed()
$    .success( newText("top word", "hello").print() )
$,
$getButton("bottom")
$    .test.printed()
$    .success( newText("bottom word", "world").print() )
  • Prints a Top and a Bottom button onto the page, which disappear when clicked. After a click on the print button, the word hello will appear if the top button is still displayed, and the word world will appear if the bottom button is still displayed.