Module: OpsManagerUiDrivers::AnimationHelper

Instance Method Summary collapse

Instance Method Details

#disable_css_transitions!(page_context = browser) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# File 'lib/ops_manager_ui_drivers/animation_helper.rb', line 3

def disable_css_transitions!(page_context = browser)
  page_context.execute_script "    // Turn off jQuery animations.\n    jQuery.fx.off = true;\n\n    // Turn off CSS transitions.\n    var animationStyles = document.createElement('style');\n    animationStyles.type = 'text/css';\n    animationStyles.innerHTML = '* {' +\n                                '  -webkit-transition: none !important;' +\n                                '  -moz-transition: none !important;' +\n                                '  -ms-transition: none !important;' +\n                                '  -o-transition: none !important;' +\n                                '  transition: none !important;' +\n                                '  -webkit-animation: none !important;' +\n                                '  -moz-animation: none !important;' +\n                                '  -o-animation: none !important;' +\n                                '  -ms-animation: none !important;' +\n                                '  animation: none !important;' +\n                                '}'\n    document.head.appendChild(animationStyles);\n  JS\nend\n"