[Solved] selenium.common.exceptions.JavascriptException: Message: javascript error: windows is not defined

Execution code:

bro.execute_script('windows.scrollTo(0,document.body.scrollHeight)')
sleep(2)

Implementation results:

selenium.common.exceptions.JavascriptException: Message: javascript error: windows is not defined
  (Session info: chrome=91.0.4472.124)

Attention
don’t add s to windows.
pay attention when auto filling!!

Correct writing!!

bro.execute_script('window.scrollTo(0,document.body.scrollHeight)')
sleep(2)

Read More: