element not visible code example
Example 1: check if element is visible
.is(':visible')
//Selects all elements that are visible.
if($('#Div').is(':visible')){
// add whatever code you want to run here.
}
$('#yourDiv:visible').callYourFunction();
Example 2: elementnotvisibleexception
This exception will be thrown when you are trying to locate a particular
element on webpage that is not currently visible even though it is present
in the DOM.
Also, sometimes, if you are trying to locate an element with the XPath which
associates with two or more element.