0

I need some help with Firefox when I zoom in and out. I'm using this function:

driver.execute_script("document.body.style.zoom='70%'")

It just works on Chrome. Does anyone know a solution for it? I'm using python and selenium.

nothing is working in Firefox. Chrome it works fine.

Ajeet Verma
  • 2,938
  • 3
  • 13
  • 24

1 Answers1

0

It looks like it is an non-standard feature and Firefox doesn't have zoom. The solution is suggested in this thread as following:

document.getElementById('x').style.MozTransform = "scale(2)";
document.getElementById('x').style.MozTransformOrigin = "0 0";
marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Mesut GUNES
  • 7,089
  • 2
  • 32
  • 49