I am creating a python flask web application with selenium in the backed I want to disable my webpage when the selenium driver is running to prevent user activity
I am using this code
<div id="disabler">
<div >
<img src="{{url_for('static', filename='images/disabler.gif')}}">
<p id="preloader-text">Running Automated Test</p>
</div>
</div>
<script>
function loader(){
$(document).ready(function(){
$("#disabler").fadeOut()
});
}
</script>
CodePudding user response:
When you are using new tab every time then it is not possible to hide. You can just put always on top feature for chosen window.
CodePudding user response:
You can use a predefined jQuery UI called jQuery Block UI
Or simply add a division that will block the body and will fade out when the body is loaded.
<div id="div">
<h1>Please Wait..</h1>
</div>
jQuery will be:
$(document).ready(function(){
$("#div").fadeOut()
});