How to use isVisible()

Hello,

I try to use isVisible()

 <?php 
 if($site->find('slider')->isVisible() == true)
{
echo "true";
} 
else
{
	echo "false";

}
?>

the site slider exist and is visible but the output is false,
what I do wrong ?

The syntax is fine. Does it really print false or do you get an error?

Oh! sorry :umbrella:
It was my mistake the page was not visible.