Fixes the following error in e2e tests: "Cannot set property style of \#<HTMLElement> which has only a getter". Closes #2874