Reference:
- What is the cleanest way to disable CSS transition effects temporarily?
- http://onezeronull.com/2016/10/06/disable-css-transitions-and-animations-temporarily-or-permanently/
Whenever I need to run test JavaScript I use JavascriptExecutor
but none of the blogs above clarifies how it can be done with it.
I tried:
js.executeScript(".notransition {
-webkit-transition: none !important;
-moz-transition: none !important;
-o-transition: none !important;
-ms-transition: none !important;
transition: none !important;
}");
But it does nothing for me.
Edit:
I tried after the answer provided by @AmerllicA
public void turnOffCss () {
navigate("https://www.bureauofdigital.com");
js.executeScript("*, *:before, *:after {
-webkit-transition: none !important;
-moz-transition: none !important;
-ms-transition: none !important;
-o-transition: none !important;
transition: none !important;
-webkit-transform: none !important;
-moz-transform: none !important;
-ms-transform: none !important;
-o-transform: none !important;
transform: none !important;
}");
}